![]() |
#1
|
|||
|
|||
![]()
Scripters,
I'm writing a solution that's simulating Fighter Command to some extent (Chain Home, Observer Corps, Filter Rooms and Command). In doing so I'm also trying to implement the concept of Flight Leaders but I'm currently stuck. I mistakingly believed all Players fly AiAicrafts and that all aicrafts are in AiGroups. This it seems is only true for non-player aicrafts (hence the "Ai" part I guess ![]() My implementation fell apart when I tried it out on a dedicated server last night but Osprey hinted that I should probably look at the "Regiment" property instead as a basis for grouping online players together. If so, can someone help me get my head around what a "Regiment" is and how it's handled by the sim in the online (and offline) context? My initial experiment got stuck on the fact that "Regiment" is a property of AiAicraft and when I safe cast the player's AiActor to an AiAircraft i get a null result, which means whatever a Player is riding is not a AiAicraft type. I tried to find out what type is implementing AiActor for a online Players by simply fetching its type name but the resulting string is just a sequence of seemingly random letters. This is likely a remoting marshaling thingy but I still have no idea what I'm dealing with. Example: Code:
public override void OnPlaceEnter(AMission mission, Player player, AiActor actor, int placeIndex) { var playerAircraft = actor as AiAicraft; // <-- 'playerAircraft' is null var typeOfPlayerActor = actor.GetType().Name; // <-- type name is gibberish }
Thanks, Mog
__________________
Core i7 3930K @ 4.8GHz; 16Gb DDR3 (Vengeance); nVidia GTX580; OS disk: 150Gb 10000rpm; SIM disk: 300Gb 10000rpm; Windows 7 x64 Ultimate |
|
|