Quote:
Originally Posted by Ataros
It seems like this script I use does not destroy ships loaded by a submission. Other ground units are destroyed as intended. What can be wrong? IIRC ships belong to AiGroundActor
Code:
//Ground objects (except AA Guns) will die after 55 min when counted from their birth
public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
{
base.OnActorCreated(missionNumber, shortName, actor);
//Ground objects (except AA Guns) will die after 55 min when counted from their birth
if (actor is AiGroundActor)
if ((actor as AiGroundActor).Type() != maddox.game.world.AiGroundActorType.AAGun)
Timeout(3300, () =>
{
if (actor != null)
{ (actor as AiGroundActor).Destroy(); }
}
);
}
Complete code here http://forum.1cpublishing.eu/showpos...5&postcount=41
|
Confirmed, the script does not destroy ships. What can be the reason?
This is what happens in 3-4 hours after starting a mission.
https://lh4.googleusercontent.com/_S...5-21_00016.jpg