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.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
Hotel Script
Hotel Script
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!
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!
-
- Support Team
- Posts: 2458
- Joined: April 27th, 2010, 5:31 pm
- IRC Username: CP
Re: Hotel Script
something like
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.
Code: Select all
level_trigger_1 = [
if ( > $key 0 ) [trigger 1 1]
else [trigger 1 0]
]
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
- GigaShadow
- Member
- Posts: 27
- Joined: October 9th, 2011, 11:30 pm
- Name: Dominic
- IRC Username: GigaShadow
- Location: Windsor CA, USA
Re: Hotel Script
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.
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.
Need Texture Help? Pm me and I can help you out with all of your texturing needs.
Re: Hotel Script
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]
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]
-
- 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: Hotel Script
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.

Want a user bar like this one? PM Leo!
-
- Support Team
- Posts: 2458
- Joined: April 27th, 2010, 5:31 pm
- IRC Username: CP
Re: Hotel Script
*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.
first, try to use the
Code: Select all
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
Re: Hotel Script
I know but what trigger do i use? i`m using 11 so u cant open it without a key with trigger 99