Results 1 to 4 of 4

Thread: OnAircraftTookOf ???

  1. #1
    Student Pilot
    Join Date
    Apr 2014
    Posts
    17
    Post Thanks / Like
    Total Downloaded
    0

    OnAircraftTookOf ???

    Hi all,

    please, someone know how OnAircraftTookOf doesn't work when the aircraft is created by a human player in a birthplace?


    public override void OnAircraftTookOff(int missionNumber, string shortName, AiAircraft aircraft)
    {
    base.OnAircraftTookOff(missionNumber, shortName, aircraft);
    GamePlay.gpHUDLogCenter("Debug: OnAircraftTookOF =>" + shortName + " is on flight.");
    }

    I'm going crazy ...

  2. #2
    Team Fusion ♣_Spiritus_♣'s Avatar
    Join Date
    Dec 2013
    Location
    The Demon-Haunted World: Science as a Candle in the Dark
    Posts
    5,600
    Post Thanks / Like
    Blog Entries
    2
    Total Downloaded
    0

    Re: OnAircraftTookOf ???

    Sorry, most I can do is give you a bump. Coding is really discouraging.

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

    Re: OnAircraftTookOf ???

    Quote Originally Posted by _1SMV_Poppy_64 View Post
    Hi all, please, someone know how OnAircraftTookOf doesn't work when the aircraft is created by a human player in a birthplace? I'm going crazy ...
    Your code is good. You likely don't have a "event listener" enabled in your OnBattleStarted routine. Add this routine to your code & it should sense when an aircraft takeoff event occurs.

    Code:
        public override void OnBattleStarted()
        {
            base.OnBattleStarted();
            MissionNumberListener = -1;  // listen for events from this mission & all submissions
        }

  4. #4
    Student Pilot
    Join Date
    Apr 2014
    Posts
    17
    Post Thanks / Like
    Total Downloaded
    0

    Re: OnAircraftTookOf ???

    Thank you Salmo!

    You right, now the script is working.
    Thank you again!

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
  •