Members | Sign In
All Forums > Mission Scripting
avatar

about the start block

posted Dec 12, 2011 17:13:11 by DrTwitch
I am just starting out on scripting and had a question about the structure of the xml itself.
Just what the heck can go in a start block?
I get that it is a handy place to set up variables, but is this sort of "read once at start of mission then ignore after that"?

Are there other blocks other than 'event'?

(end block maybe? but that may be covered elsewhere).

thanks to everyone that puts up with my perpetual ignorance...
---- ---- ----
here come the drums
page   1
3 replies
avatar
Vorus said Dec 12, 2011 17:51:17
As far as I know, the start block is read only once, so it's a nice place to put things that you want to have at the beginning of the mission. I place all the "terrain" objects in the start block, as well as the player ships, initial enemies and allies, and the starbases. I'll also use it to start any timers that need to be counting from the beginning, and that sort of thing.

I don't know of any other block types, other than event. Or at least, I can't think of them off-hand.

As usual, I'm sure Mike will stop by here soon and give you a much better answer. :P
-----------
Khomerex nal Khesterex

The unofficial Artemis Wiki, your best source for Artemis Information
avatar
TreChipman said Dec 12, 2011 19:13:30
Pretty much what Vorus said; the start block is a handy place to build the terrain, set your timers, and initialize any variables you have.
I'm not a mad scientist. I'm an angry one. You'd be wise to fear the latter.

Visit Artemis Command!
avatar
Mike_Substelny said Dec 12, 2011 20:42:26
Yes, the start block is executed once and ignored thereafter.

The start block is for creating objects, modifying object properties, setting variables and timers, and sending messages (both Big_message and Comms) that you want to happen the moment the mission begins. Do not put any conditionals on the Start block because they would be meaningless.

The only other type of block is the Event block. Even "End Mission" is an Event block.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
Login below to reply: