Page 1 of 1
Hotel Script
Posted: October 15th, 2011, 6:33 pm
by lzrstrm
Im making a store script for my hotel were you can buy a key to a room.
the door im using is set to trigger type 11 so only when you pick up a key with level trigger as 99 then it will open.
but i was wondering if i can set a level trigger to a key you buy from a store script?
so its like real life. you cant get into the hotel room without the key which you buy from the front desk
very confused and need help!
Re: Hotel Script
Posted: October 15th, 2011, 6:54 pm
by arcones
Just to clarify, is this FPS or RPG?
Re: Hotel Script
Posted: October 15th, 2011, 7:09 pm
by lzrstrm
Fps
Fps
Fps
Fps
Re: Hotel Script
Posted: October 15th, 2011, 11:04 pm
by chocolatepie33
something like
Code: Select all
level_trigger_1 = [
if ( > $key 0 ) [trigger 1 1]
else [trigger 1 0]
]
There may be incorrect parts in there, this checks to see if you have more than 0 keys and opens the door (triggering trigger 1) if you do. Otherwise, the door won't open. Or so I believe.
Re: Hotel Script
Posted: October 17th, 2011, 9:47 pm
by lzrstrm
no i need it in a store script
Re: Hotel Script
Posted: October 17th, 2011, 9:58 pm
by GigaShadow
in your gui instead of making it activate that trigger tag just bypass it and take the trigger tag code and execute it there.
eg:
newgui Sectors [
guitext "would you like to buy something" chat
guibar
guibutton "I WANT A KEY TO THAT DOOR!!!!" [PUT THE CODE THAT THE TRIGGER WOULD DO HERE!]
guibutton "I want a brain" [echo I want one too][map Brainmap]
IDK. Something like that.
Re: Hotel Script
Posted: October 17th, 2011, 10:16 pm
by lzrstrm
like this
newgui Sectors [
guitext "would you like to buy something" chat
guibar
guibutton "I WANT A KEY TO THAT DOOR!!!!" [99=trigger]
guibutton "I want a brain"[cleargui]
Re: Hotel Script
Posted: October 18th, 2011, 10:37 am
by arcones
No the trigger has to do something. In addition, you have to physically pick up the key. This isn't RPG mode so there aren't a lot of options.
Re: Hotel Script
Posted: October 18th, 2011, 6:34 pm
by chocolatepie33
*sigh*
first, try to use the
for code, obviously. Second, what you would do is create a store to buy a key, then take the key to the door. The door has a trigger on it, so that way, if you don't have the key, it won't open. If you DO have a key, then it will. That's the kind of code that sounds like what you need.
Re: Hotel Script
Posted: October 18th, 2011, 6:39 pm
by lzrstrm
I know but what trigger do i use? i`m using 11 so u cant open it without a key with trigger 99