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.

Coding Help

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.
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Coding Help

Post by PizzaLover101 »

I am making a map about a dance club type thing
I was trying to make a window appear asking if you were on the admin list and this is what I got:

Code: Select all

level_trigger_1 = [showgui diolouge1; echo "Are you on the guest list?"]

newgui diolouge1[
guitext "If your not please leave and go to the front desk and pay the $100 fee." Chat
guitext "If you are that please enjoy this place and the dance floor above."]
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
AName
Member
Member
Posts: 14
Joined: June 23rd, 2010, 9:03 am
Name: Andrew

Re: Coding Help

Post by AName »

Looks pretty good... three things:
1. You seemingly accidentally left out chat after the second quote - just pointing that out.
2. You need a mapmodel that will trigger this... In edit mode, press F1 to pull up a list of mapmodels. Place one that you want (press Z in edit mode to undo or Delete to kill it and try another model).
3. Press the period button on your keyboard. This will give you the preset coding for the currently selected model. The first two numbers are Yaw (rotation) and the Model # - don't change them. The third number is the trigger type - you probably want 5. The fourth number is the trigger number - in this case (because of your coding) it should be 1. This should be of great help: http://sandboxgamemaker.com/platinumart ... _mapmodel_.

Also, I figure since you have the code typed up you already knew this, but just in case: enter your coding by pressing F6 in edit mode - Make sure you save and execute when done.
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Coding Help

Post by PizzaLover101 »

ok, thank you

edit: That didn't help, a message poped up in the top left corner, but nothing popped up
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
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: Coding Help

Post by arcones »

I have to disagree with AName the F6 config editor. If you do that it won't register when you publish the map. It's best to do an out-game config file that you type the code into. I'd recommend using copying a map-art.cfg and renaming it to your map's name.

I'm gonna try and rewrite it all for you.

Code: Select all

level_trigger_1 = [showgui diolouge1; echo "Are you on the guest list?"]

newgui diolouge1[
guitext "If your not please leave and go to the front desk and pay the $100 fee." Chat
guitext "If you are that please enjoy this place and the dance floor above."]
This is what you have...

Code: Select all

"level_trigger_1" = showgui diolouge1; echo "Are you on the list?" 
newgui diolouge1 [
guitext "If you're not please leave and go to the front desk and pay the $100 fee." chat
guitext "If you are, please enjoy this place and the dance floor above." chat
guibutton "Alright." "cleargui"
] "Bouncer"
or if that doesn't work, try this:

Code: Select all

"level_trigger_1" = showgui diolouge1 
newgui diolouge1 [
guitext "Are you on the list?" chat
guitext "If you're not please leave and go to the front desk and pay the $100 fee." chat
guitext "If you are, please enjoy this place and the dance floor above." chat
guibutton "Alright." "cleargui"
] "Bouncer"
Image
Want a user bar like this one? PM Leo!
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: Coding Help

Post by Leo_V117 »

You didnt format it correctly...
And I may as well make it better for you.

Code: Select all

cash = 200
admition = 0
admitonfee = 100

level_trigger_1 = [if (= $admition 1) [echo "Come on in!"; showgui dialogue1] [else (= $admition 0) [echo "Youre not on the Guest List!"; echo "Go pay the $100 Admiton fee and come back"]]]

level_trigger_2 = [if (= $admition 1) [echo "Youve already payed the admition fee"] [else (= $admition 0) [echo "Would you like admition to the Club?"; echo "Its $100"; showgui admition]]]

newgui dialogue1 [
   guitext "You Payed the admition fee" chat
   guitext "Before you go, please sign here" chat
   guilist [
      guitext "Signature:"
      guifield signature 20
      ]
   guibar
   guibutton (format "Set Signature as %1?" $signature)   [$name = $signature; cleargui; echo "Thanks"]
   ]
]

newgui admition [
   guitext (format "Your cash: $%1" $cash)
   guitext (format "Admition Fee: $%1" $admitionfee)
   guibar
   guitext "Would you like to pay the admition fee?"
   guilist [
      guibutton "Yes"   [if (< $cash 101) [admition = 1; cash = (- $cash $admitionfee); echo "You payed $100 for admition!"; echo "Thank You!"]]
      guibutton "No"   [cleargui; echo "Okay, See you!"]
      ]
   ]
]
That should fix it...

@arcones We replied at the same time... Mines more technical...
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: Coding Help

Post by arcones »

I find that hilarious :D
Image
Want a user bar like this one? PM Leo!
AName
Member
Member
Posts: 14
Joined: June 23rd, 2010, 9:03 am
Name: Andrew

Re: Coding Help

Post by AName »

I have to disagree with AName the F6 config editor. If you do that it won't register when you publish the map. It's best to do an out-game config file that you type the code into. I'd recommend using copying a map-art.cfg and renaming it to your map's name.
How are we supposed to know these things without you telling us first...? Also, what good is it to be ready to publish the map if you can't find a single tutorial anywhere explaining how to export your game as an exe?
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Coding Help

Post by PizzaLover101 »

Ummmmmm.......... Idk if i did something wrong, but noone's worked, but i did something else to work. If I want music in my game, how do i make it so that the selection is random?
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
siimvuss
Member
Member
Posts: 410
Joined: August 19th, 2009, 1:27 am
Name: S
IRC Username: S
Location: Estonia

Re: Coding Help

Post by siimvuss »

AName wrote:
I have to disagree with AName the F6 config editor. If you do that it won't register when you publish the map. It's best to do an out-game config file that you type the code into. I'd recommend using copying a map-art.cfg and renaming it to your map's name.
How are we supposed to know these things without you telling us first...? Also, what good is it to be ready to publish the map if you can't find a single tutorial anywhere explaining how to export your game as an exe?
The thing is: Tutorials are always made by the users of the program. But if all users want to have tutorials and are not willing to make them themselves then who will make them? Think about it before you start complaining.
AName
Member
Member
Posts: 14
Joined: June 23rd, 2010, 9:03 am
Name: Andrew

Re: Coding Help

Post by AName »

The thing is: Tutorials are always made by the users of the program.
Let me rephrase this to have the same meaning but be more clear:
The thing is: Tutorials are only made by the users of the program.

...and that's exactly why this is not how it's supposed to work, especially when it comes to any sort of complex work like coding.

But if all users want to have tutorials and are not willing to make them themselves then who will make them? Think about it before you start complaining.
If none of the users have any knowledge of how to do something, what can anyone do besides complain? If the makers really want the users to use their program to its fully capabilities, they need to pass on the information - it really is as simple as that. I know nobody likes complaining, but I have come to the point where I now have to stop working on my game and wait for replies on how to do something (that "supposedly" is possible - e.g. making your game into an executable), but it seems like nobody can do it in the first place because the information isn't provided publicly anywhere.
Locked