Page 1 of 2
need help with elevator script and door script
Posted: June 9th, 2010, 3:18 am
by NPCwars
i need help scripting the elevator to go up and down but with a switch to activate it to go up and one to make it go down and i want a door to be open with a switch as well if there is any tutorial's out there for this.
Re: need help with elevator script and door script
Posted: June 9th, 2010, 8:18 am
by arcones
The door is fairly simple if you don't want to do any scripting:
Create a key, or switch.
Click it, and hit F3.
Change the trigger type to any one of these commands:
Sandbox Trigger Commands
Change the level trigger to any number (just make sure that it's the same level trigger as the door)
Create a door.
Click and hit F3.
Change the trigger type like before (8,9,10, or 11 are best for doors)
Change the level trigger so that it corresponds with the key or switch. Get out of edit mode and test!
Hope that helps!
Arcones 
Re: need help with elevator script and door script
Posted: June 9th, 2010, 8:44 am
by Leo_V117
hm... I know what youre on about... But dont you think it will be easier to create a switch for the door on the outside, and a switch on the inside that will open a Menu that allows you to select Up or Down? I know this is possible because there was a rather cool part for platforms on Cube 2... Hold on, Ill just find it.
Re: need help with elevator script and door script
Posted: June 9th, 2010, 12:39 pm
by NPCwars
arcones wrote:The door is fairly simple if you don't want to do any scripting:
Create a key, or switch.
Click it, and hit F3.
Change the trigger type to any one of these commands:
Sandbox Trigger Commands
Change the level trigger to any number (just make sure that it's the same level trigger as the door)
Create a door.
Click and hit F3.
Change the trigger type like before (8,9,10, or 11 are best for doors)
Change the level trigger so that it corresponds with the key or switch. Get out of edit mode and test!
Hope that helps!
Arcones 
hmm im trying to set it up i did wut you sed and nothings working its like this if i touch the door it opens and i have to touch it again to close it
wen i set it to a target number and then wen i set it to a diffrent number it dosent work or its like that door on the train map that opens wen you get close.
i dont know wut im doing wrong with the switch script i want the switch to open the door
Re: need help with elevator script and door script
Posted: June 9th, 2010, 1:10 pm
by arcones
Okay, sounds like you used trigger type 10? If so, the door waits 5 seconds before closing. That's probably what you're seeing.
Just change the trigger type to one that fits your idea
Arc

Re: need help with elevator script and door script
Posted: June 9th, 2010, 3:34 pm
by NPCwars
arcones wrote:Okay, sounds like you used trigger type 10? If so, the door waits 5 seconds before closing. That's probably what you're seeing.
Just change the trigger type to one that fits your idea
Arc

okay i dont want to offend you in any way but wen i touch the door it opens and wen i touch it again it close's and the switch isnt playing any part in it i dont know wut im doing wrong if there's another tutorial on how to use switch's with doors and elevators that wood be good or just door's

Re: need help with elevator script and door script
Posted: June 9th, 2010, 3:54 pm
by Leo_V117
Door: Trigger Type 11, Trigger tag 5
Switch: Trigger Type 10, Trigger Tag 5
Re: need help with elevator script and door script
Posted: June 9th, 2010, 3:57 pm
by arcones
NPCwars wrote:arcones wrote:Okay, sounds like you used trigger type 10? If so, the door waits 5 seconds before closing. That's probably what you're seeing.
Just change the trigger type to one that fits your idea
Arc

okay i dont want to offend you in any way but wen i touch the door it opens and wen i touch it again it close's and the switch isnt playing any part in it i dont know wut im doing wrong if there's another tutorial on how to use switch's with doors and elevators that wood be good or just door's

Okay, I just want to make sure, that you have the level_trigger_#'s at the same number:
Key: level_trigger_1
Door: level_trigger_1
That's what needs to be the same. (Don't worry, no offense taken

)
Re: need help with elevator script and door script
Posted: June 9th, 2010, 4:05 pm
by NPCwars
Leo_V117 wrote:Door: Trigger Type 11, Trigger tag 5
Switch: Trigger Type 10, Trigger Tag 5
thank you
Re: need help with elevator script and door script
Posted: June 9th, 2010, 4:05 pm
by NPCwars
arcones wrote:NPCwars wrote:arcones wrote:Okay, sounds like you used trigger type 10? If so, the door waits 5 seconds before closing. That's probably what you're seeing.
Just change the trigger type to one that fits your idea
Arc

okay i dont want to offend you in any way but wen i touch the door it opens and wen i touch it again it close's and the switch isnt playing any part in it i dont know wut im doing wrong if there's another tutorial on how to use switch's with doors and elevators that wood be good or just door's

Okay, I just want to make sure, that you have the level_trigger_#'s at the same number:
Key: level_trigger_1
Door: level_trigger_1
That's what needs to be the same. (Don't worry, no offense taken

)
thank you