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.

Sandbox Start Program

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
Runescapedj
Member
Member
Posts: 1706
Joined: January 9th, 2010, 9:06 am
Name: Michiel
IRC Username: Sandboxdj
Location: Deventer, the Netherlands

Re: Sandbox Start Program

Post by Runescapedj »

I´m not good at coding but maybe you need money first=
If this isn´t what you wanted you should ask Arc, because he knows much more coding than me
AndyLangel
Member
Member
Posts: 55
Joined: May 25th, 2010, 12:15 am
Name: Andy

Re: Sandbox Start Program

Post by AndyLangel »

:P naa, something with my trade tab code is messed up- the actual purchasing of things works 100%, but that second tab doesn't show. But hopefully Arc reads this post :P otherwise ill just probably forget about this code :P
Image
Learning C/C++
... Slowly,
...... Slowly,
.........Slowly.
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: Sandbox Start Program

Post by arcones »

With your tab code? As in, the tab for the diff buttons aren't working?

Maybe you don't have

Code: Select all

newgui (Trade)
showgui Trade //can't remember if that's 100% correct, but that might be missing. You're opening a new tab and thence a new gui...
Image
Want a user bar like this one? PM Leo!
AndyLangel
Member
Member
Posts: 55
Joined: May 25th, 2010, 12:15 am
Name: Andy

Re: Sandbox Start Program

Post by AndyLangel »

Hmm, not sure- i guess i need to just look into the guitab usage a little more. Though, i am currently rewriting my old system, and the new one should be 110% better, also- your coding is a tad bit rusty.

As i have learned, a new tab would be given as such: (Keep in mind i've only been using sandbox for a little over 24 hours, i could be wrong)

Code: Select all

level_trigger_1 = [showgui ExampleGUI]

newgui ExampleGUI [
   guitext "This is the first GUI tab."
   guitab "Tab 2" [
      guitext "not quite sure if this would work, but you can try..."
      //or maybe you have to put:
      showgui GUI2
   ]
]

//Code for GUI2
I don't yet know how data enrty goes for tabs yet- BUT i have learned that for showgui, you must have it ALONE (at least inside a gui menu) and not encased in () or [], the doing so will render it useless.

Though, i will take a look into it tonight, and with any luck i can add it to my improved show script :)
Image
Learning C/C++
... Slowly,
...... Slowly,
.........Slowly.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Sandbox Start Program

Post by Hirato »

guitab only accepts one argument, not two

Code: Select all

    guitab "My Tab"
    guitext "ZOMG TEXT!!!!"
    guibutton "I like cats" "echo so do I!"
This is not a url, clicking it is pointless
AndyLangel
Member
Member
Posts: 55
Joined: May 25th, 2010, 12:15 am
Name: Andy

Re: Sandbox Start Program

Post by AndyLangel »

Hirato wrote:guitab only accepts one argument, not two

Code: Select all

    guitab "My Tab"
    guitext "ZOMG TEXT!!!!"
    guibutton "I like cats" "echo so do I!"
Ohh... So everything under a tab declaration is put into the tab? Hmm... ill try it out, Thanks! :D

Yeah, couldn't get it to work >.< also, know how to use guistayopen?
Image
Learning C/C++
... Slowly,
...... Slowly,
.........Slowly.
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: Sandbox Start Program

Post by arcones »

I guess that would make sense... I'm totally gonna brush up on CS now... :P

So.....

Code: Select all

guitab "Trade" [
          guilist [
             guibutton "Iron Ore: 1gp" [
                if ( >= $ironore 1) [
                   ironore = ( - $ironore 1)
                   gold = ( + $gold 1)
                   echo "You sold 1 iron ore for 1 gold."
                ]
                if ( < $ironore 1) [
                   echo "You don't have any iron ore to sell!"
                ]
             ]
             guibutton "Iron Bar: 3gp" [
                if ( >= $ironbar 1) [
                   ironbar = ( - $ironbar 1)
                   gold = ( + $ gold 3)
                   echo "You sold 1 iron bar for 3 gold."
                ]
                if ( < $ironbar 1) [
                   echo "You don't have any iron bar to sell!."
                ]
             ]
             guibutton "Sword: 15gp" [
                if ( >= $sword 1) [
                   sword = ( - $sword 1)
                   gold = ( + $gold 15)
                   echo "You sold 1 sword for 15 gold."
                ]
                if ( < $sword 1) [
                   echo "You don't have any sword to sell!"
                ]
             ]
          ]
       ]
Won't work because... it'll only allow just some text or a button? Not an entire list? (Am I following? :) )
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: Sandbox Start Program

Post by Leo_V117 »

.... By the looks of things you guys are trying to get guitabs working. Correct? If so... Its this:

Code: Select all

newgui Example [
    guitext "this is some text"
    guitext "see how it works?"

    guitab Tab 2
    guitext "more text"
Locked