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.

Scripting

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.
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Scripting

Post by owenisred »

Hi everyone,

I have (I think) become proficient in using all the sandbox's tools that dont require scripting. However I need to know more :)

I understand that no one is going to spell out a massive scripting tutorial for me. However would it be possible if someone could show me an example of a script, and what it does. Ill try to figure out what it all means, and I'll come back to you with plenty of questions :)

Thanks in advance,
Owen.
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
User avatar
Bigboss
Member
Member
Posts: 282
Joined: July 23rd, 2010, 1:35 pm
Name: Naked Snake
Contact:

Re: Scripting

Post by Bigboss »

Yeah I cant script either...
IDK how to either :D:D:
Zombie map (Version 2) Image
Image
Want a user bar like this one? PM Leo
Image
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: Scripting

Post by PizzaLover101 »

Go on the Wiki
http://sandboxgamemaker.com/wiki/index. ... =Main_Page
or look in the tutorials for scripts

or if you really want one, here's a menu script

Code: Select all

newgui Name [
guitext "Hi, I'm a menu, continue?" chat
guibar
guibutton "Yes"
guibutton "No" ]
Yes = [map mapname]
No = [echo "^fs^f3Have Fun!^fr"]
level_trigger_1 = [showgui Name]
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/
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Scripting

Post by chocolatepie33 »

hmm... I always thought it was more like this...

Code: Select all

level_trigger_1 = [showgui npc1-1]                                   
newgui npc1-1 [                                                                     
guitext "Hi."                                                                           
guibar                                                                                     
guibutton "Hi. What's up? [showgui npc1-2]                               
guibutton "Ehh... Hi?" [showgui npc1-3]                                     
] "Random person" 


If Yes and No are outside of the [], they wouldn't be recognized, would they?

If you haven't seen the "Random Person", that replaces npc1-1. Look at the village configuration file.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
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: Scripting

Post by PizzaLover101 »

actually, it works. It's just like that for the whole script, but it doesn't work for my the way you did for some reason
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/
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Re: Scripting

Post by owenisred »

Thanks for your responces!
Go on the Wiki
http://sandboxgamemaker.com/wiki/index. ... =Main_Page
or look in the tutorials for scripts
Ah I am the biggest idiot ever. I have been on that page so many times looking for tutorials, and I didn't see the TUTORIALS part... Thanks anyway :)

So.....

Say I have written my script... How do I impliment that in my game...?
How do I trigger a level trigger?

Thanks once again,
Owen.
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Re: Scripting

Post by owenisred »

Oh is it the trigger tag of a mapmodel that correlates to the trigger level number in the script? (Edit - yea it is I just tested it :))

If so can the number of trigger tags go above 100, or would there never be that many scripts in a level anyway or what lol...

Sorry about the number of questions, just really trying to bet my head around this :S

Thanks again,
Owen.
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
User avatar
Bigboss
Member
Member
Posts: 282
Joined: July 23rd, 2010, 1:35 pm
Name: Naked Snake
Contact:

Re: Scripting

Post by Bigboss »

that sounds right and its OKAY! I'm a noob too :D
Ive prolly asked OVAH NINE THOUSAND! questions last month...
thats why I procrastinate w/ forum games in Off Topic
Zombie map (Version 2) Image
Image
Want a user bar like this one? PM Leo
Image
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Re: Scripting

Post by owenisred »

Ok so can the number of trigger tags go above 100?
The brunt of cubescript is concerned with Aliases. Aliases have 3 basic uses.

store lists and values for extended periods of time
store temporary lists and values
grouping a set of commands which are useful when combined
I understand the last one now I think:

You would type

Level_Trigger_X //where X is the Trigger tag number

Any ideas about the first two?
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
owenisred
Member
Member
Posts: 452
Joined: August 9th, 2010, 9:33 am
Name: Owen

Re: Scripting

Post by owenisred »

Ok so can the number of trigger tags go above 100?
The brunt of cubescript is concerned with Aliases. Aliases have 3 basic uses.

store lists and values for extended periods of time
store temporary lists and values
grouping a set of commands which are useful when combined
I understand the last one now I think:

You would type

Level_Trigger_X = [ //where X is the Trigger tag number of the object in the game you are attaching a trigger to
command 1 //where the commands are basic things like echo etc. (is there a proper list of these?)
command 2
command3
]

Then in game you would find an object, set its trigger type 0-29 each one acts in a different way when you come near it, and set its trigger tag to X.

Then the commands will be carried out... ok...

Any ideas about the first two?

Also can you create your own trigger types? (Ambitious?)

Thanks,
Owen.
I'm taking modelling requests again - any models you want created,skinned or animated (or all 3) leave a post here:

viewtopic.php?f=9&t=2704&start=0

My tutorial site - still under construction, but lots of good stuff there:

http://pasandbox.webs.com/
Locked