View Single Post
  #15  
Old 05-28-2012, 12:48 AM
Freyah's Avatar
Freyah Freyah is offline
Approved Member
 
Join Date: May 2012
Posts: 8
Default

Thankyou Kodiak! That works like a charm. Got it to work using this :

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;


public class Mission : AMission
{


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


        if ("109".Equals(shortName))
        {
            AiAction Action = GamePlay.gpGetAction("109"); // if your action has an other Name than your trigger change GamePlay.gpGetAction(shortName) into GamePlay.gpGetAction("ActionName")

            if (Action != null)
                Action.Do();

            GamePlay.gpGetTrigger(shortName).Enable = false; // if trigger is TPassThru to avoid multiple activation

            return; // leave method to avoid second call of the Action
        }



        
    }
}
( I think I can change the - AiAction Action = GamePlay.gpGetAction("109"); - back to (shortName).. but I'll leave it scince it works...

I'm very grateful for your time and for this lesson! I'm in your debt Sir!
Now to tackle the Multiple trigger ones.....

Cheers,
Freyah
Reply With Quote