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.

locked doors

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.
Locked
swift shot01
Member
Member
Posts: 11
Joined: August 31st, 2010, 3:00 pm
Name: Brandon

locked doors

Post by swift shot01 »

can someone tell me how to trigger a door to open when i interact with a lever?
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: locked doors

Post by chocolatepie33 »

Set the door to trigger type 11, set the level trigger to #, then place a lever, set the trigger type to 8, then set the level trigger to # (same as door). This should let you open/close the door as the lever is activated each time (trigger 8 is like an on/off trigger).

A more complicated, but possibly better way, is to do this:

place a door mapmodel, hit F3 and change to trigtype 11, levtrig #. Then in another spot, add an invisible model (a -1 value) and change the trigtype to 12 and levtrig to a different #. Save your map, reload it, then go into edit mode and hit F6. Then add this code:

Code: Select all

on_start = [
key1 = 0
]

level_trigger_2 = [ key1 = ( + $key1 1 ) ]
level_trigger_3 = [ if ( > $key1 0 ) [ trigger 3 1 ] ]
levtrig 2 is a key, levtrig 3 is the door. if the key value is more than 0, then the door should lock.
This was based offa Arcones' tut like this.
Last edited by chocolatepie33 on September 17th, 2010, 9:51 pm, edited 1 time in total.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: locked doors

Post by daltonds1 »

Like what do you mean?
Give more info
User avatar
Runescapedj
Member
Member
Posts: 1706
Joined: January 9th, 2010, 9:06 am
Name: Michiel
IRC Username: Sandboxdj
Location: Deventer, the Netherlands

Re: locked doors

Post by Runescapedj »

he wants 2 make a locked door, which you can open by touching a lever
swift shot01
Member
Member
Posts: 11
Joined: August 31st, 2010, 3:00 pm
Name: Brandon

Re: locked doors

Post by swift shot01 »

would the same thing work for a moving platform or elevator
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: locked doors

Post by daltonds1 »

Umm.. Im sure it would if it doesn't just ask me and ill help you
But actually im not sure if it would.. just go see
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: locked doors

Post by chocolatepie33 »

yes, you can. I think the script's a bit different, but you can. I remember doing this a while back, but I don't remember the exact code...

Sorry if I wasn't much help.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
Locked