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.

Opening Door with key.

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
porings
Member
Member
Posts: 12
Joined: June 28th, 2009, 6:04 am
Name: poring
IRC Username: poring

Opening Door with key.

Post by porings »

I'm having problem opening doors with a key. my conf

"level_trigger_31" = [ if (= $key1 1) [ trigger 4 1 ] [echo "FF7The door is locked."] ]
"level_trigger_32" = [ if (= $key2 1) [ trigger 4 1 ] [echo "FF7The door is locked."] ]

"key1" = [0]
"key2" = [0]

/entset mapmodel {Y] [N] 11 31 0
/entset mapmodel [Y] [N] 11 32 0

i used /key1 = 1 but it can't be opened.
i picked up the key using my pickup script but it can't be opened also.
Please help. Thx
User avatar
Mike
Administrator
Administrator
Posts: 871
Joined: May 24th, 2009, 12:52 pm

Re: Opening Door with key.

Post by Mike »

That is more complicated script than I've ever used so I can't really comment on it. My method would be in game is to make the key trigger type 12, trigger 1 and then the door trigger type 11 and trigger 1, for example. This would make it so you can pick up the key and it will disappear and the door should be unlocked. For more trigger types and such you might want to check this:
http://sandboxgamemaker.com/platinumart ... _mapmodel_

Take care.
-mike
Sign up for our Newsletter to keep up to date with the Sandbox news!
We also have a facebook page, facebook group, myspace page and a twitter page[/b][/color]!
bryanfblareunion
Member
Member
Posts: 24
Joined: October 21st, 2009, 11:01 am
Name: bryanfbla

Re: Opening Door with key.

Post by bryanfblareunion »

in ur config file add:

Code: Select all

"on_start" = [
      key1 = 0
      key2 = 0
]

if [ ( = $key1 1 ) [trigger (door number) 1]
Hope this helps :geek:
Last edited by Obsidian on December 11th, 2009, 1:55 pm, edited 1 time in total.
Reason: [code] tags ftw
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Opening Door with key.

Post by Hirato »

on_start is superfluous in 2.4, it's fine as it was :P

the problem here is that he doesn't have triggers for the keys, so their aliases are never set to true, and hence the doors will subsequently remain closed
This is not a url, clicking it is pointless
Locked