PDA

View Full Version : Suggestion for Team17 - Advanced mission editor


Acegikmo
1 Oct 2006, 23:20
I'd like to have a more advanced mission editor that uses a simple script language.

Like you can write scripts for certain events.
You can have lots of events on an object.
So let's say I add a "Destroyed" event on an oildrum.
The "Destroyed" event is triggered when the oildrum is destroyed.
So, in description it will say:
"Triggers when destroyed"

So you can name each object.
Worms are called playerworm01, playerworm02 etc.
and AI worms are named the thing you chose and 01 after.
Like "Kilburn01".
All names are used as referece for using scripts.

Anyway, all code in the "Destroyed" event is triggered when you destroy the object you have the event in.
So in the code you can write like:

create_object(mine,mymine01,1034,345)

and that script creates a mine with the name "mymine01" at x position 1034 and y position 345.
create_object(object type,name of the thing created,x,y)
You can do the same with oildrums and so on.

Anyway, events that should exist are:

-Created (What happens when object is spawned)
-All the time (What happens when object exists, meaning it's code is constantly triggered)
-Touched (What happens when you touch it, or picks it up)
-Drowned (What happens when object drowns in water)
-Destroyed (What happens when object is destroyed)

So, in the Events code, you can write lots of scripts.

[]-is changeable
{}-is only used for comparing

Here are all scripts that should exist:

[]-OBJECT.health------playerworm01.health = 25
{}-team_health(COLOR)------if team_health(red) < 400
[]-OBJECT.x-------mine01.x = 580
[]-OBJECT.y-------spadge01.y = 135
||-create_object(object,name,x,y)------create_object(oildrum,oildrum06,543,54)

and many more, you get what I mean

Script Description for events above:
[]-is changeable
{}-is only used for comparing
||-is only used for execution


Anyway, you are probably very confused, lol.
So, the scripts you can change has a "." in them.
If you have a create event for a worm, you can write in the creation code:
health = 100

And if you want to change the worm health when an oildrum is destroyed, you can use this in the oildrums Destroyed event code:
playerworm01.health = 100

so, an advanced thing can look like this in a code for a created event in a playerworm:

if team_health(blue) > 500
{
health+=50;
}

So if the whole blue teams total health is over 500, the worm you had the event in gets 50 more health.

This is VERY much like GML (Game Maker Language)
If you want to know what I mean, download game maker demo.
http://www.gamemaker.nl/

I hope this wasn't too confusing :P