Results 1 to 4 of 4

Thread: need a bit of help here please

  1. #1
    Team Fusion TWC_Fatal_Error's Avatar
    Join Date
    Dec 2013
    Location
    Florida
    Posts
    678
    Post Thanks / Like
    Total Downloaded
    226.63 MB

    need a bit of help here please

    need to know how a trigger sets up a condition and what it looks like so we can intercept it with a .cs using say OnObjectDestroyed=%


    If you can set up a trigger to detect the condition, then we can intercept the trigger, when it is triggered, in the .cs file. Then we can do whatever we want at that point, including launch a sub-mission or whatever. We could also prevent the trigger from being triggered too often (such as, maximum once every 5 minutes, once every 15 minutes, or whatever).

    Will something like this work????
    Code:
    public override void OnTrigger(int missionNumber, string shortName, active)
    {
    base.OnTrigger(missionNumber, shortName, active);
    if ("F1".Equals(shortName) && active)
    
    AiAction action = GamePlay.gpGetAction("action1");
    if (action != null)
    {
    action.Do();
    }
    List<string> RandomMissions = GetFilenamesFromDirectory(CLOD_PATH + FILE_PATH + "/red", "bomber"); // bomber missions from the red directory
    if (RandomMissions.Count > 0)
    {
    string RandomMission = RandomMissions[random.Next(RandomMissions.Count)];
    GamePlay.gpPostMissionLoad(RandomMission);
    }
    }
    Last edited by TWC_Fatal_Error; Mar-31-2017 at 08:29.
    i7 2700 ,32 gigs, 4 ssd's ,1 7200rpm 2terabyte,1 samsung 55 display,2 mfd's,EDTRACKER,Warthog ,X55 stick, 7inch liliput monitor in mfd's 21 I-inc secondary display for instruments using virtual cockpit
    [*]iustus facere unus[*] JUST MAKE ONE ( FATAL ERROR) Commander TWC http://twcpilots.com

  2. #2
    Team Fusion TWC_Fatal_Error's Avatar
    Join Date
    Dec 2013
    Location
    Florida
    Posts
    678
    Post Thanks / Like
    Total Downloaded
    226.63 MB

    Re: need a bit of help here please

    SAL, Phil, REDDOG, anyone?
    i7 2700 ,32 gigs, 4 ssd's ,1 7200rpm 2terabyte,1 samsung 55 display,2 mfd's,EDTRACKER,Warthog ,X55 stick, 7inch liliput monitor in mfd's 21 I-inc secondary display for instruments using virtual cockpit
    [*]iustus facere unus[*] JUST MAKE ONE ( FATAL ERROR) Commander TWC http://twcpilots.com

  3. #3
    Team Fusion Salmo's Avatar
    Join Date
    Nov 2011
    Posts
    2,332
    Post Thanks / Like
    Total Downloaded
    191.25 MB

    Re: need a bit of help here please

    Not tested ....

    Code:
    public override void OnTrigger(int missionNumber, string shortName, active)
    {
         base.OnTrigger(missionNumber, shortName, active);
    
         if ("F1".Equals(shortName) && active) 
         {
             AiAction action = GamePlay.gpGetAction(shortName);
             if (action != null)
             {
                // action.Do(); // doesn't matter what the pre-set trigger action was, we'll do something different
                List<string> RandomMissions = GetFilenamesFromDirectory(CLOD_PATH + FILE_PATH + "/red", "bomber"); // bomber missions from the red directory
                if (RandomMissions.Count > 0)
                {
                   string RandomMission = RandomMissions[random.Next(RandomMissions.Count)];
                   GamePlay.gpPostMissionLoad(RandomMission);
                }
             }
             GamePlay.gpGetTrigger("F1").Enable = true;  // need to reactivate the trigger, can be time delayed if u want
        }
    }

  4. #4
    Team Fusion TWC_Fatal_Error's Avatar
    Join Date
    Dec 2013
    Location
    Florida
    Posts
    678
    Post Thanks / Like
    Total Downloaded
    226.63 MB

    Re: need a bit of help here please

    ty Sal, Flug and I will test tonight. OnPlayerSatisfied Trigger return true when help comes from the top thanks old friend Fatal
    i7 2700 ,32 gigs, 4 ssd's ,1 7200rpm 2terabyte,1 samsung 55 display,2 mfd's,EDTRACKER,Warthog ,X55 stick, 7inch liliput monitor in mfd's 21 I-inc secondary display for instruments using virtual cockpit
    [*]iustus facere unus[*] JUST MAKE ONE ( FATAL ERROR) Commander TWC http://twcpilots.com

  5. Likes ATAG_Lolsav liked this post

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •