Quote:
Originally Posted by FG28_Kodiak
Depens on situation:
Normaly with gpActorByName in this example the Aircraft with name "0:BoB_RAF_F_111Sqn_Early.000"
Code:
AiAircraft aircraft = GamePlay.gpActorByName("0:BoB_RAF_F_111Sqn_Early.000") as AiAircraft;
if (aircraft != null)
{
// code
}
|
Thank you Kodiak, that worked. My problem was that I was using the wrong name. In the .mis file I had "BoB_RAF_F_242Sqn_Early.00", but I see now: I have to use "
0:BoB_RAF_F_242Sqn_Early.00
0".
So, if I got it ok,
BoB_RAF_F_242Sqn_Early.00 is a group and
n:BoB_RAF_F_242Sqn_Early.000 is an specific ac in that group
(where n = 0,1,,2 ...)
For the trailing added 0 I have no explanation
It is easier to get the name if I run the mission, right click ->view and hover the mouse over the ac of interest. Then a label appears with the exact name. I read this from you time ago and I had forgotten...
Thanks for pointing me in the right direction-
S!