Quote:
Originally Posted by Troll2k
What is Spawn Point Script 0?
What is it used for?
How do you use it?
|
I think it actually means SpawnPoint ScriptOn (with the n cut off)
Basically this is to spawn AI (planes/tanks etc.) at different times from mission start. If you don't check the SpawnPoint ScriptOn that group of AI (regardless if you have them scripted in or not) will all spawn on mission startup. So you make a trigger with TTime (for time delay - as an example) and an action for that trigger (spawn air group - to spawn AI planes) and from that action you choose the airgroup (similar to setting a target with the FMB - the target recticle will show up and you can hover over the spawn point for w/e airgroup you want to spawn) and then you put the scripts in the scripts window. In that window you can also left click and "compile" to check to see your script is ok.
Here's a tidbit from Kodiac that taught me how it works:
Quote:
Originally Posted by FG28_Kodiak
You can also script a Mission with C#
for example to spawn the airgroup with a script
Make a trigger with name "SpawnAirgroup1" and a action "Airgroup1" and insert following code in the script window.
Code:
using System;
using maddox.game;
using maddox.game.world;
public class Mission : maddox.game.AMission
{
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
if ("SpawnAirgroup1".Equals(shortName) && active)
{
AiAction action = GamePlay.gpGetAction("Airgroup1");
if (action != null)
{
action.Do();
}
GamePlay.gpHUDLogCenter("Spitfires near");
GamePlay.gpGetTrigger(shortName).Enable = false;
}
}
}
With scripts you are much more flexible.
I've made tutorials about scripting in german (my english is to bad  ):
http://forum.sturmovik.de/index.php/topic,689.0.html
http://forum.sturmovik.de/index.php/topic,695.0.html
http://forum.sturmovik.de/index.php/topic,699.0.html
http://forum.sturmovik.de/index.php/topic,711.0.html
http://forum.sturmovik.de/index.php/topic,721.0.html
http://forum.sturmovik.de/index.php/topic,727.0.html
http://forum.sturmovik.de/index.php/topic,764.0.html
|