Page 1 of 1

Opening Door with key.

Posted: July 19th, 2009, 3:02 am
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

Re: Opening Door with key.

Posted: July 19th, 2009, 6:04 am
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

Re: Opening Door with key.

Posted: December 11th, 2009, 1:37 pm
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:

Re: Opening Door with key.

Posted: December 11th, 2009, 7:59 pm
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