Nexus Modding > Scripting
Scripting Issues
The Old Dragon:
Mine's the 'far from ideal' approach I'm afraid :(
What I've done is to damage the ships I want to be wrecks (about 60 to 75 percent) and then turn them into 'asteroids' with 'Behaviour:=4;' command.
With that level of damage, the 'wrecks' yaw & roll with all the burn marks just as if you'd shot them all up yourself. But anymore damage than that and they won't respond to the command to change!
Mularac:
Uhm... I'm sorry, but that didn't work out either... I still get the tairace.cpp (too many ships) error...
The Old Dragon:
Hmmm, not too sure then...
How many wrecks are you trying to create?
If you wish to, send me the relevant files and I'll see if I can spot something.
Mularac:
better than that, could you write an small example of what you did?
The Old Dragon:
Certainly can. This is an excerpt from the actual rule of the campaign edition mission that does the work, as you can see, there really isn't much to it...
--- Code: ---//List the ships we want to be wrecked...
SWrecks:=GetfreeSel();
SelectShips(SWrecks,S.race=#race_Wreck);
ExecList(SWrecks,
//And make them damaged.
S.this:Damage:=Rnd(60,75);
//And turn them into asteroids...
S.this:Behaviour:=4;
);
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version