1C Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official 1C Company forum > 1C Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2014, 04:58 PM
_1SMV_Poppy_64 _1SMV_Poppy_64 is offline
Approved Member
 
Join Date: Apr 2011
Posts: 21
Default OnAircraftTookOf ???

Hi all,

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

Quote:
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 ...
__________________
www.1smv.it
Reply With Quote
  #2  
Old 04-25-2014, 08:44 AM
theOden theOden is offline
Approved Member
 
Join Date: May 2011
Location: Sweden
Posts: 221
Default

hmm I had issues with this one before but got it working after removing code that deletes all "editor placed planes" if served in multiplayer.

Now on the other hand (TF4.312) I get the behaviour you describe (I guess I was TF4.3 last time).

Simple mission on Steppe having "Birthplaces" and one single in editor Hurricane (=player) with this code only:

Quote:
using System;
using System.Collections;
using maddox.game;
using maddox.game.world;
using maddox.GP;

public class Mission : AMission
{
// Public Overrides //
public override void OnAircraftTookOff(int missionNumber, string shortName, AiAircraft aircraft)
{
base.OnAircraftTookOff(missionNumber, shortName, aircraft);

GamePlay.gpHUDLogCenter("OnAircraftTookOff " + shortName + " as " + aircraft.InternalTypeName());
GamePlay.gpLogServer(null, "OnAircraftTookOff {0} as {1}", new object[] { shortName, aircraft.InternalTypeName() });
}

public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
{
base.OnAircraftLanded(missionNumber, shortName, aircraft);

GamePlay.gpHUDLogCenter("OnAircraftLanded " + shortName + " as " + aircraft.InternalTypeName());
GamePlay.gpLogServer(null, "OnAircraftLanded {0} as {1}", new object[] { shortName, aircraft.InternalTypeName() });
//Timeout(150, () => { if (aircraft != null) aircraft.Destroy(); });
}
}
Weird but I'll try to dig some more.

Edit:
Just tried my little Steppe-mission without TF-patch (vanilla 1.11 that is) and I get the very same behaviour - only editor placed planes trigger this.
__________________

Last edited by theOden; 04-27-2014 at 06:44 AM.
Reply With Quote
  #3  
Old 04-26-2014, 11:55 AM
_1SMV_Poppy_64 _1SMV_Poppy_64 is offline
Approved Member
 
Join Date: Apr 2011
Posts: 21
Default

Yes, I'm trying on 4.312 without succes, it's working only if is an AI that take off or land...

It is very important to have this event wrote on an eventlog, for statistics (we are building up a new statistic parser) and for dinamic campaign.
__________________
www.1smv.it
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:42 PM.

Based on a design by: Miner Skinz.com

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.