![]() |
#37
|
||||
|
||||
![]() Quote:
public override void OnTrigger(int missionNumber, string shortName, bool active) { //call base classes OnTrigger method. base.OnTrigger(missionNumber, shortName, active); GamePlay.gpHUDLogCenter("shortname = " + shortName); //if the trigger that was called is the trigger that we're looking for if (shortName.Equals("AttackConvoy2Delay1")) { AiAction action = GamePlay.gpGetAction("AttackConvoy2_1") ; if (action != null) { action.Do(); } } } The '&& active' didn't work because: 1. It seems it should be + not && 2. You can see I tested for the shortname and of course ("AttackConvoy2Delay1" + active) isn't equal to "AttackConvoy2Delay1". I don't know what 'active' comes back as but it would make the strings unequal. Also, I put { } around the if(action != null) output as { action.Do(); } although that may not havebeen necessary. Anyway it works ! Thanks for the help TheEnlightenedFlorist.
__________________
klem 56 Squadron RAF "Firebirds" http://firebirds.2ndtaf.org.uk/ ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders |
|
|