View Single Post
Old 11-07-2012, 01:55 PM
FG28_Kodiak FG28_Kodiak is offline
Senior Member
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884

the action is only activated if the trigger is triggered, you can also place it outside if you like.

Also deactivating trigger means to disable theme for good or after they invoked?
All other triggers are deactivated after activation, exept TGroupDestroyed is also deaktivated if the group reached the last waypoint. TPassThru is not deaktivated after activation so you must do it via script.
In my case above the passthru tigger must be activated once. But you can disable a trigger at any time. For example you have two condition one win and one fail.
Maybe the win condition is to destroy groundtargets and you use a TGroundDestroy trigger and the fail condition you must make it before the time is over. To avoid the activation of the second trigger you can disable it.
    public override void OnTrigger(int missionNumber, string shortName, bool active)
        base.OnTrigger(missionNumber, shortName, active);

        if (shortName.Equals("TimerTriggerName"))
            GamePlay.gpHUDLogCenter("You failed Time is over");
            GamePlay.gpGetTrigger("GroundDestroyed").Enable = false;

        if (shortName.Equals("GroundDestroyed"))
            GamePlay.gpHUDLogCenter("You win you destroyed the Groundtargets");
            GamePlay.gpGetTrigger("TimerTriggerName").Enable = false;


Last edited by FG28_Kodiak; 11-07-2012 at 02:00 PM.
Reply With Quote