I'm working an a package that will cause a MASSIVE spawning of Xenon ships (2 carriers, 6 m2's and about 50 fighters). It's to give people with nice shiny new m1's and m2's something to worry about!
It'll be a little mini mission with a reward for helping defeat the enemy fleet etc.
I can spawn the ships ok, but then I want to give them different scripts to run.
I want to set up some pretty advanced behaviour (formations of enemy fighters, bombing runs by enemy fighters against player ships, propper CAP patrols, enemy m5's doing missile defence of enemy capital ships)
a simple example would be .....
I want 2 of the m2's to protect each m1. Then I want to the m1's to each run a custom patrol script. Then the remaining m2's also need to be given seperate patrol commands.
If I use a seperate script to spwan each ship, I can just set $ship as the return variable from the create ship commnad, then use '$ship -> call script xxx.xxx.xxx' to make it do what I want.
With about 60-70 ships being spawned that's ALOT of seperate scripts. though and surely there must be a better way of doing it????
Is there any way to say ...
create ship X
add default items to ship X
Make ship X run this script/start this command
create ship y
add default items to ship y
Make ship y run this script/start this command
Etc etc etc......
I don't think this works with a normal script call as I think

This means ship X would be created, default items added to it, then it would run say a patrol script for example. But ship Y wouldn't be created untill ship X had finnished running that script.
I may be being a complete muppet
