![]() |
Player's Aircraft
How can I find out what aircraft the player is in when they spawn in?
OnPlaceEnter Player interface... I can't figure out how to determine it. |
Are you looking for the type of aircraft the player is flying or the AiAircraft object?
In OnPlaceEnter(), actor can be cast as an AiAircraft. If you want the type of aircraft, cast actor to an AiAircraft and call InternalTypeName(). The string it gives you will look like this: "bob:Aircraft.Bf-109E-3". |
Quote:
Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) Kodiak uses 0:BoB_LW_LG2_I.000 Type bob:Aircraft.Ju-88A-1 player.Name() => player callsign player.Place().Name() => 0:BoB_LW_LG2_I.000 (actor as AiAircraft).InternalTypeName() => bob:Aircraft.Ju-88A-1 You can get the actual playerplane with AiAircraft airc1 = (AiAircraft)GamePlay.gpPlayer().Place(); also. |
Thanks,
That'll probably do it. I'll try when I get home. On a side note: What's the difference between AiAircraft.TypeName() and AiAircraft.InternalTypeName()? |
TypedName() shows the tactical number of the plane.
|
Thanks!
|
All times are GMT. The time now is 07:36 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.