Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #38  
Old 10-16-2011, 05:01 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

@David:
I use the InternalTypeName of the plane, here others for the flyable planes:
bob:Aircraft.Bf-109E-3
bob:Aircraft.Bf-109E-3B
bob:Aircraft.Bf-109E-1
bob:Aircraft.Bf-109E-4
bob:Aircraft.Bf-109E-4B
bob:Aircraft.Bf-110C-4
bob:Aircraft.Bf-110C-7
bob:Aircraft.Ju-87B-2
bob:Aircraft.Ju-88A-1
bob:Aircraft.He-111H-2
bob:Aircraft.He-111P-2
bob:Aircraft.SpitfireMkIa
bob:Aircraft.SpitfireMkI
bob:Aircraft.HurricaneMkI
bob:Aircraft.HurricaneMkI_dH5-20
bob:Aircraft.BlenheimMkIV
bob:Aircraft.SpitfireMkIIa

to figure this out the KI-Only Planes you can add:
Code:
GamePlay.gpLogServer(null, "InternalTypeName: {0}", new object[]{(actor as AiAircraft).InternalTypeName()});
to OnActorCreated(...) so you see the internal name in the chatbar and in the log (if enabled in conf.ini).

To destroy the planes from a specific Airgroup is not possible in OnActorCreated(..) at the time of creation there is no Airgroup.
But you can use the ActorName
Code:
GamePlay.gpLogServer(null, "ActorName: {0}", new object[] { (actor as AiAircraft).Name() });
If i use:
Code:
    public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
    {
        base.OnActorCreated(missionNumber, shortName, actor);

        if (actor != null && actor is AiAircraft)
        {

            GamePlay.gpLogServer(null, "InternalTypeName: {0}", new object[] { (actor as AiAircraft).InternalTypeName() });

            GamePlay.gpLogServer(null, "ActorName: {0}", new object[] { (actor as AiAircraft).Name() });
        }
}
i get this in the chatbar (from earlier example)
Server: InternalTypeName: bob:Aircraft.Bf-109E-4
Server: ActorName: 0:BoB_LW_LG2_I.000
Server: InternalTypeName: bob:Aircraft.He-111H-2
Server: ActorName: 0:BoB_LW_KuFlGr_706.000
Server: InternalTypeName: bob:Aircraft.He-111H-2
Server: ActorName: 0:BoB_LW_KuFlGr_706.001
Server: InternalTypeName: bob:Aircraft.He-111H-2
Server: ActorName: 0:BoB_LW_KuFlGr_706.002
Server: InternalTypeName: bob:Aircraft.He-111H-2
Server: ActorName: 0:BoB_LW_KuFlGr_706.010
Server: InternalTypeName: bob:Aircraft.He-111H-2
Server: ActorName: 0:BoB_LW_KuFlGr_706.011
Server: InternalTypeName: bob:Aircraft.He-111H-2
Server: ActorName: 0:BoB_LW_KuFlGr_706.012

so if you like to destroy planes from a Airgroup you could use:
Code:
        if (actor is AiAircraft && actor.Name().Contains("BoB_LW_KuFlGr_706"))
        {
             Timeout(60, () =>    // Time in Seconds
                         {
                             (actor as AiAircraft).Destroy();
                         });
        }
or a specific plane
Code:
        if (actor is AiAircraft && actor.Name().Contains("BoB_LW_KuFlGr_706.010"))
        {
             Timeout(60, () =>    // Time in Seconds
                         {
                             (actor as AiAircraft).Destroy();
                         });
        }
Reply With Quote
 


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:47 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.