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.
AndyLangel
Member
Member
Posts: 55
Joined: May 25th, 2010, 12:15 am
Name: Andy

Sandbox Start Program

Post by AndyLangel »

Hello everyone!

I was just wondering if there was a way i could make my own 'SandBoxLauncher'. Well, i know i can make one in Visual Basic, but i have an issue-

Is there anyway to open the SandBoxLauncher and see what it does? or open the Launcher File? Has anyone done this before?

Basically, i am looking for a way to find what is needed to make a executable file that will start my game. The only information i really require is how i would go about making a Visual Basic program open a map and begin the game- without ever starting the official Sandbox launcher.

Any ideas?

EDIT:

Found that 'CLICK_ME_TO_START' thing, edited it and now it opens up in RPG, mode.... i assume this would be along the lines of a proper executable for my map? Also, anyone know if there is a way to have it open right up to my map, rather than to the main menu?
Image
Learning C/C++
... Slowly,
...... Slowly,
.........Slowly.
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 »

maybe you can just make a shortcut on your desk to the map?
Is that what you meant?
AndyLangel
Member
Member
Posts: 55
Joined: May 25th, 2010, 12:15 am
Name: Andy

Re: Sandbox Start Program

Post by AndyLangel »

that would work, yes- but how do you make the map open? can you just click on the map file and it opens? O.o

Also, side not-

Anyone know what each Trigger Type is good for? is there like a list for them or something? they seem to be quite... odd :P
Image
Learning C/C++
... Slowly,
...... Slowly,
.........Slowly.
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 »

no, triggers are for example to open doors, if you hit a key with trigger 5, than (with the right coding) the door(s) with trigger 5 will open, you can do this without coding using teleporters.

I hope this helps
AndyLangel
Member
Member
Posts: 55
Joined: May 25th, 2010, 12:15 am
Name: Andy

Re: Sandbox Start Program

Post by AndyLangel »

but what about the trigger type?

such as NPCs should be trigger type 11, and trigger type 1 is for teleporting...

idk, just wanted to know what they were all for, since most act different from the rest.

Aslo, on yet another side note: this code isn't working quite right, the stuff in the Trade tab doesn't show up, any suggestions?

Code: Select all

level_trigger_3 = [showgui Trader]

newgui Trader [
	guitext "Hello there! Would you be interested in some of my goods?"
	guibar
	guilist [
		guibutton "Iron Ore: 3gp" [
			if ( >= $gold 3) [
				gold = ( - $gold 1)
				ironore = ( + $ironore 1)
				echo "You bought 1 iron ore."
			]
			if ( < $gold 3) [
				echo "You do not have enough gold to purchase that."
			]
		]
		guibar
		guibutton "Iron Bar: 5gp" [
			if ( >= $gold 5) [
				gold = ( - $gold 5)
				ironbar = ( + $ironbar 1)
				echo "You bought 1 iron bar."
			]
			if ( < $gold 5) [
				echo "You do not have enough gold to purchase that."
			]
		]
		guibar
		guibutton "Sword: 20gp" [
			if ( >= $gold 20) [
				gold = ( - $gold 20)
				sword = ( + $sword 1)
				echo "You bought 1 sword."
			]
			if ( < $gold 20) [
				echo "You do not have enough gold to purchase that."
			]
		]
	]
	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!"
				]
			]
		]
	]
]
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 »

Andy wrote:but what about the trigger type?

such as NPCs should be trigger type 11, and trigger type 1 is for teleporting...

idk, just wanted to know what they were all for, since most act different from the rest.
Here's a link for Sauerbraten's Trigger states

Tells you what each one does ;)

Code: Select all

    level_trigger_3 = [showgui Trader]

    newgui Trader [
       guitext "Hello there! Would you be interested in some of my goods?"
       guibar
       guilist [
          guibutton "Iron Ore: 3gp" [
             if ( >= $gold 3) [     //I don't know for sure if it should be exactly like that... ( >= because your saying two different things... it's a less than equals thingy...
                gold = ( - $gold 1)
                ironore = ( + $ironore 1)
                echo "You bought 1 iron ore."
             ]
             if ( < $gold 3) [
                echo "You do not have enough gold to purchase that."
             ]
          ]
          guibar
          guibutton "Iron Bar: 5gp" [
             if ( >= $gold 5) [
                gold = ( - $gold 5)
                ironbar = ( + $ironbar 1)
                echo "You bought 1 iron bar."
             ]
             if ( < $gold 5) [
                echo "You do not have enough gold to purchase that."
             ]
          ]
          guibar
          guibutton "Sword: 20gp" [
             if ( >= $gold 20) [
                gold = ( - $gold 20)
                sword = ( + $sword 1)
                echo "You bought 1 sword."
             ]
             if ( < $gold 20) [
                echo "You do not have enough gold to purchase that."
             ]
          ]
       ]
       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!"
                ]
             ]
          ]
       ]
    ] //other than that it looks fine...
Did you at all happen to take that from Gobologna's shop script?
Hope that helps!

Arc :geek:
Image
Want a user bar like this one? PM Leo!
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 »

You know I'm not that good in coding Arc,
But I think you made a mistake, watch for the arrow (------------------------------>):
arcones wrote:

Code: Select all

    level_trigger_3 = [showgui Trader]

    newgui Trader [
       guitext "Hello there! Would you be interested in some of my goods?"
       guibar
       guilist [
          guibutton "Iron Ore: 3gp" [
             if ( >= $gold 3) [     //I don't know for sure if it should be exactly like that... ( >= because your saying two different things... it's a less than equals thingy...
                gold = ( - $gold 1) ----------------------------------------------------------> - 1 gold?
                ironore = ( + $ironore 1)
                echo "You bought 1 iron ore."
             ]
             if ( < $gold 3) [
                echo "You do not have enough gold to purchase that."
             ]
          ]
          guibar
          guibutton "Iron Bar: 5gp" [
             if ( >= $gold 5) [
                gold = ( - $gold 5)
                ironbar = ( + $ironbar 1)
                echo "You bought 1 iron bar."
             ]
             if ( < $gold 5) [
                echo "You do not have enough gold to purchase that."
             ]
          ]
          guibar
          guibutton "Sword: 20gp" [
             if ( >= $gold 20) [
                gold = ( - $gold 20)
                sword = ( + $sword 1)
                echo "You bought 1 sword."
             ]
             if ( < $gold 20) [
                echo "You do not have enough gold to purchase that."
             ]
          ]
       ]
       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!"
                ]
             ]
          ]
       ]
    ] //other than that it looks fine...
Did you at all happen to take that from Gobologna's shop script?
Hope that helps!

Arc :geek:
AndyLangel
Member
Member
Posts: 55
Joined: May 25th, 2010, 12:15 am
Name: Andy

Re: Sandbox Start Program

Post by AndyLangel »

Regarding my code:

>= normally stands for Greater or Equal to- ill double check the argument to make sure its the same for Sandbox code- though, that part of the code was fine- the part i am having issues with is:

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!"
            ]
         ]
      ]
   ]
That tab shows up in my trader's dialog box- but when you click it the tab is empty :s

Anyone have a clue as to why?

Also, check the Sandbox code thing-

>= is Greater than or Equal to, <= is the less than or equal to:

so 'if ( >= $gold 3)' is just checking to see if '$gold' is greater or equal to 3- it works fine in my script as well, i am able to buy all the ore i wish until my 100 gold runs out :P

Also- wrote this myself.. so.... yeah- probably missed a [ or ] along the way that is causing the entire thing to not work :S or i used a [] in a spot i should have used a ()... not sure. I'll double check it, but i might just re-write the entire system.
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 »

Well, if the argument is sound then you should be fine... I'd recommend creating an inventory for your bought stuff to show up in (if you haven't done it already :P )

Another thing, if you're missing the [] then it would tell you in the top right when you tried to execute the code ;)

I'll hopefully try this code today :)

EDIT: Ya know what? IF you haven't coded the inventory right, you might not be able to see it... just an idea.
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 »

ohh, i never added an inventory- but the issue is with the options for selling stuff is not showing up- ill show you what i mean below :)

With:

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!"
                ]
             ]
          ]
       ]
i get this:

Image

So i have no clue what im doing wrong :s
Image
Learning C/C++
... Slowly,
...... Slowly,
.........Slowly.
Locked