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.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
how do i script?
how do i script?
okay....i'm brand new to game making and when i ask for help i get this complicated mess of words, but i dont know where let alone how to type any of that jumble...
i would also like to know if it is possible to make a different items interact (eg a switch turn on a light etc.) and if i can make things attack me.
i would extremely appreciate a simple explination of how and where to type the cfg files or something (dont know what cfg is either)
if it's possible i would like to know how the scripting works (what script does what)
i would also like to know if it is possible to make a different items interact (eg a switch turn on a light etc.) and if i can make things attack me.
i would extremely appreciate a simple explination of how and where to type the cfg files or something (dont know what cfg is either)
if it's possible i would like to know how the scripting works (what script does what)
Last edited by Codeman on April 12th, 2010, 7:09 pm, edited 2 times in total.
Re: please help
Hi there.
Please change your topic's title via the "edit post" function to more accurately describe your problem.
If you cannot do this, your topic may be locked for not obeying this rule.
Thanks.
Please change your topic's title via the "edit post" function to more accurately describe your problem.
If you cannot do this, your topic may be locked for not obeying this rule.
Thanks.
うるさいうるさいうるさい!
github: https://github.com/damianb/
github: https://github.com/damianb/
- Leo_V117
- Support Team
- Posts: 1640
- Joined: February 16th, 2010, 8:00 pm
- Name: Leo
- IRC Username: Leo_V117
- Location: That one place...
- Contact:
Re: please help
Usually ------------------------------------------------------------------------------------------------------------------------------------------->^
Theyre arrows by the way, ^^
Theyre arrows by the way, ^^
Game Projects
Sandbox Tools
- Venima
- Support Team
- Posts: 259
- Joined: February 17th, 2010, 4:56 am
- Name: Tombstone
- IRC Username: Venima
- Location: Somewhere in the eternal planes between the living and the dead
Re: please help
Leo that doesn't help if he has a different resolution to yours XD
At the top right of your first post that you made is some buttons, above your username and details, one of them being "EDIT POST". Click that and you can edit your topic title.
At the top right of your first post that you made is some buttons, above your username and details, one of them being "EDIT POST". Click that and you can edit your topic title.
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament
Try out my: CFG Easy Text Editor (Note: still in beta)
-----Venima
Try out my: CFG Easy Text Editor (Note: still in beta)
-----Venima
Re: how do i script?
found the button and got it fixed but ummm... i'm still in the dark!!!!
- Venima
- Support Team
- Posts: 259
- Joined: February 17th, 2010, 4:56 am
- Name: Tombstone
- IRC Username: Venima
- Location: Somewhere in the eternal planes between the living and the dead
Re: how do i script?
Right. Getting something to attack you I don't know how to do myself but others do I believe. You may need to use RPG mode for that.
Turning on a light would be damned hard to script, I don't know how I would go about doing that. Perhaps setting up a teleport from an unlit room to a copy of that room only lit upon switching a switch, but that's sorta cheating, not that it matters. It does work because I've used a method like that for filling a room up with water. Match a "teleport" with a "teledest" by setting their tags to the same number. Come back to this once you've read the rest.
Anyway. While ingame, and in edit mode, press F6. The window you see there is the "cfg" editor, aka script editor. There you can write script so that mapmodels and platforms etc. do things. Instead of editing script ingame you can go to the "my_stuff\packages\base" folder. It'll be called <map_name>.cfg
There are loads of different commands you can use for the script. An understanding of the concepts of programming would make script editing so much easier. But for now I will help with the basics.
When you press F3 while a mapmodel is selected, a list of different properties pops up. The trigger type and trigger tag properties are important for scripting.
The trigger type is basically what will happen when the mapmodel is touched (e.g. will it disappear, will it only trigger the script once or every time you touch it, will a door open, will it be locked etc.). Refer to this for different trigger types and what they do: http://sandboxgamemaker.com/platinumart ... _mapmodel_
The trigger tag is the identifier which allows it to be triggered uniquely. A nice simple example would be the locked door. Create a door and set it's trigger type to 11 and tag to 1 (which tag doesn't really matter but I'll use 1 for this). Then create a switch with trigger type 3 and the same trigger tag as the door (aka 1). When you touch the switch, it switches and the door opens. Note that the door won't open as you approach the door itself.
So far you don't need to write anything in the cfg editor. But you could do something simple as to write a message to say when the door has opened. To do that, you open the script editor (F6) and write in there:
level_trigger_1 is what happens when you approach a mapmodel with trigger tag 1. "echo" is basically a command which writes something up in the top left corner of the screen. Get it so far?
Turning on a light would be damned hard to script, I don't know how I would go about doing that. Perhaps setting up a teleport from an unlit room to a copy of that room only lit upon switching a switch, but that's sorta cheating, not that it matters. It does work because I've used a method like that for filling a room up with water. Match a "teleport" with a "teledest" by setting their tags to the same number. Come back to this once you've read the rest.
Anyway. While ingame, and in edit mode, press F6. The window you see there is the "cfg" editor, aka script editor. There you can write script so that mapmodels and platforms etc. do things. Instead of editing script ingame you can go to the "my_stuff\packages\base" folder. It'll be called <map_name>.cfg
There are loads of different commands you can use for the script. An understanding of the concepts of programming would make script editing so much easier. But for now I will help with the basics.
When you press F3 while a mapmodel is selected, a list of different properties pops up. The trigger type and trigger tag properties are important for scripting.
The trigger type is basically what will happen when the mapmodel is touched (e.g. will it disappear, will it only trigger the script once or every time you touch it, will a door open, will it be locked etc.). Refer to this for different trigger types and what they do: http://sandboxgamemaker.com/platinumart ... _mapmodel_
The trigger tag is the identifier which allows it to be triggered uniquely. A nice simple example would be the locked door. Create a door and set it's trigger type to 11 and tag to 1 (which tag doesn't really matter but I'll use 1 for this). Then create a switch with trigger type 3 and the same trigger tag as the door (aka 1). When you touch the switch, it switches and the door opens. Note that the door won't open as you approach the door itself.
So far you don't need to write anything in the cfg editor. But you could do something simple as to write a message to say when the door has opened. To do that, you open the script editor (F6) and write in there:
Code: Select all
level_trigger_1 = [
echo "The door has opened."
]
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament
Try out my: CFG Easy Text Editor (Note: still in beta)
-----Venima
Try out my: CFG Easy Text Editor (Note: still in beta)
-----Venima
-
- Member
- Posts: 13
- Joined: April 11th, 2010, 8:01 pm
- Name: spencer
Re: how do i script?
and where does the script go? where do you type it in can you paste a script on there if you copy it
- Leo_V117
- Support Team
- Posts: 1640
- Joined: February 16th, 2010, 8:00 pm
- Name: Leo
- IRC Username: Leo_V117
- Location: That one place...
- Contact:
Re: how do i script?
AI isnt implimented yet. It will be in 2.6 hopefully. As for where the script goes. Whilst in the editor press escape, then select Editing GUI. Go to CFG, type a random letter/word/nummber in and press save. Exit sandbox and look in your mystuff/packages/base folder for your maps cfg, paste your code in there and save it.
Game Projects
Sandbox Tools
- Venima
- Support Team
- Posts: 259
- Joined: February 17th, 2010, 4:56 am
- Name: Tombstone
- IRC Username: Venima
- Location: Somewhere in the eternal planes between the living and the dead
Re: how do i script?
You didn't read my second paragraph.the game masters G.D wrote:and where does the script go? where do you type it in can you paste a script on there if you copy it
You can open the .cfg file using notepad and paste stuff into it like that.While ingame, and in edit mode, press F6. The window you see there is the "cfg" editor, aka script editor. There you can write script so that mapmodels and platforms etc. do things. Instead of editing script ingame you can go to the "my_stuff\packages\base" folder. It'll be called <map_name>.cfg
Tombstone's Tournament round 2 has begun! Tombstone's Posting Tournament
Try out my: CFG Easy Text Editor (Note: still in beta)
-----Venima
Try out my: CFG Easy Text Editor (Note: still in beta)
-----Venima