View Single Post
  #1  
Old 02-29-2012, 12:19 AM
hc_wolf hc_wolf is offline
Approved Member
 
Join Date: Jul 2010
Posts: 439
Default TGroupDestroyed Is this working for Trains???

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");
 			});
		}
	}
__________________
__________________
Win7, 64bit Ultra
Asus P8P67Pro MB
Intel i7-2600K
Coursair 16GB (4x 4GB), DDR3-1600MHz
Gainward Nvidia 580GTX 3GB DDR5
850-Watt Modular Power Supply
WIN7 and COD on Gskill SSD 240GB
40" Panasonic LCD
TrackIR5 +
Thrustmaster Warthog stick, throttle & pedals
Reply With Quote