Hi all,
I want to run a script that if the train is destroyed 10% then the trigger is activated.
The problem is in the scripting I don't think TGroupDestroyed is working for trains. Can anyone confirm this or provide a script showing it is working?
When I use a 109 and blow up the engine and some fuel tanks blow up on train it does not register that at least 10% of train is destroyed.... I do notice it says many carriages destroyed by crator. I have not tested with a bomb.
Here is my script that should work: Any help would be appreciated
Below is in the .MIS file
[Trigger]
TrainDestroyed TGroupDestroyed 0_Chief 10
[Action]
noting
Below is in the .CS file
Code:
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
if ("TrainDestroyed".Equals(shortName) && active)
{
GamePlay.gpHUDLogCenter("The Train has been destroyed!!!");
GamePlay.gpGetTrigger(shortName).Enable = false;
Timeout(10, () =>
{
GamePlay.gpLogServer(null, "Train Destroyed", new object[] { });
GamePlay.gpHUDLogCenter("Train Destroyed");
});
}
}