problem with basic script for tdm and locked doors

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
PRIME
Private
Posts: 2
Joined: Sun Feb 02, 2003 7:11 pm

problem with basic script for tdm and locked doors

Post by PRIME »

hi, ive just added my first locked doors to my map and need help with the script. my map is a straightforward tdm map. i also havnt yet made a script for it so if any1 could be kind enuff to print a exact script which i need id really appreciate it. the doors have been followed from the tut on this site but i got lost as soon as scripting came up. if no1 has a script they dont mind sharing then could some1 plz help us i really need it. thanks
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

This is the basic TDM Script which u can get from this site with the door locked part added

Code: Select all

// Yourmapname title
// ARCHITECTURE: Who made the map 
// SCRIPTING: Who did the scripting

main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none" //your score board picture

level waittill prespawn

exec global/DMprecache.scr

exec global/ambient.scr yourmapname //may want to make your own ambient sounds, read the tut

level.script = "maps/dm/yourmapname.scr" // remember to put in your map name

level waittill spawn

exec global/door_locked.scr::lock // this is the locked door script

end


Save your .scr as yourmapname.scr and put it together with your map!

I think that should do it
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
PRIME
Private
Posts: 2
Joined: Sun Feb 02, 2003 7:11 pm

Post by PRIME »

do i keep the // after every line.
Shifty
Map Reviewer
Posts: 717
Joined: Sun Dec 15, 2002 11:53 pm
Location: UK
Contact:

Post by Shifty »

anything after // is not used by the script its just used to explain things in the script
.MDT Webmaster, Mapper, Moddeler & Concept Artist
.Map Reviewer
Image
http://www.shiftys-bunker.tk Under Construction
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

The "//" is to put in notes and reminders, like what command does it do, and for example a dialogue, then you can put what it says, so it's not so tedious to find out what you've written.
Live to map, not map to live.
-mohaa_rox, .map
moderator
Post Reply