Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

need help with elevator script and door script

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
User avatar
NPCwars
Member
Member
Posts: 10
Joined: June 9th, 2010, 1:23 am
Name: Heath

need help with elevator script and door script

Post 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.
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: need help with elevator script and door script

Post 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 :geek:
Image
Want a user bar like this one? PM Leo!
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: need help with elevator script and door script

Post 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.
User avatar
NPCwars
Member
Member
Posts: 10
Joined: June 9th, 2010, 1:23 am
Name: Heath

Re: need help with elevator script and door script

Post 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 :geek:
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
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: need help with elevator script and door script

Post 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 :geek:
Image
Want a user bar like this one? PM Leo!
User avatar
NPCwars
Member
Member
Posts: 10
Joined: June 9th, 2010, 1:23 am
Name: Heath

Re: need help with elevator script and door script

Post 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 :geek:
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 :(
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: need help with elevator script and door script

Post by Leo_V117 »

Door: Trigger Type 11, Trigger tag 5
Switch: Trigger Type 10, Trigger Tag 5
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: need help with elevator script and door script

Post 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 :geek:
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 ;) )
Image
Want a user bar like this one? PM Leo!
User avatar
NPCwars
Member
Member
Posts: 10
Joined: June 9th, 2010, 1:23 am
Name: Heath

Re: need help with elevator script and door script

Post by NPCwars »

Leo_V117 wrote:Door: Trigger Type 11, Trigger tag 5
Switch: Trigger Type 10, Trigger Tag 5
thank you
User avatar
NPCwars
Member
Member
Posts: 10
Joined: June 9th, 2010, 1:23 am
Name: Heath

Re: need help with elevator script and door script

Post 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 :geek:
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
Locked