View Single Post
  #2  
Old 09-27-2011, 10:34 AM
SNAFU SNAFU is offline
Approved Member
 
Join Date: Feb 2011
Posts: 324
Default

The Trigger-Action was broken a few patchs ago. You have to activate the Action by script.

First define Triggers as usual (Groupdead Triggers must have same Name as the Spawn-Action) and then implement the following into your script:

Code:
 public override void OnTrigger(int missionNumber, string shortName, bool active) 
    {
       base.OnTrigger(missionNumber, shortName, active); 

          if ("YourTriggerName".Equals(shortName) && active) 
          { 
                AiAction action = GamePlay.gpGetAction("YourActionName"); //same as YourTriggerName
                GamePlay.gpLogServer(null, " Your Trigger was triggered ", new object[] { }); //Testmessage
                if (action != null)
               {
                     action.Do();
               }
                GamePlay.gpGetTrigger(shortName).Enable = false;            
          }
}
You can also work around the trigger by script methods, but that`s another story.
__________________
http://cornedebrouwer.nl/cf48e

Last edited by SNAFU; 09-27-2011 at 10:39 AM.
Reply With Quote