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.

Hotel Script

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
User avatar
lzrstrm
Member
Member
Posts: 122
Joined: September 21st, 2011, 8:26 pm
Name: Cameron
Location: Canada

Hotel Script

Post 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!
Virus 44
Image
arcones
Support Team
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

Post by arcones »

Just to clarify, is this FPS or RPG?
Image
Want a user bar like this one? PM Leo!
User avatar
lzrstrm
Member
Member
Posts: 122
Joined: September 21st, 2011, 8:26 pm
Name: Cameron
Location: Canada

Re: Hotel Script

Post by lzrstrm »

Fps
Fps
Fps
Fps
Virus 44
Image
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Hotel Script

Post 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.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
User avatar
lzrstrm
Member
Member
Posts: 122
Joined: September 21st, 2011, 8:26 pm
Name: Cameron
Location: Canada

Re: Hotel Script

Post by lzrstrm »

no i need it in a store script
Virus 44
Image
User avatar
GigaShadow
Member
Member
Posts: 27
Joined: October 9th, 2011, 11:30 pm
Name: Dominic
IRC Username: GigaShadow
Location: Windsor CA, USA

Re: Hotel Script

Post 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.
Need Texture Help? Pm me and I can help you out with all of your texturing needs.
User avatar
lzrstrm
Member
Member
Posts: 122
Joined: September 21st, 2011, 8:26 pm
Name: Cameron
Location: Canada

Re: Hotel Script

Post 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]
Virus 44
Image
arcones
Support Team
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

Post 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.
Image
Want a user bar like this one? PM Leo!
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Hotel Script

Post 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.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
User avatar
lzrstrm
Member
Member
Posts: 122
Joined: September 21st, 2011, 8:26 pm
Name: Cameron
Location: Canada

Re: Hotel Script

Post 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
Virus 44
Image
Locked