Log in

View Full Version : help actor


Fer912
04-12-2012, 07:56 PM
hello, maybe I make a noob question, but I'm going crazy, how do I know if an aircraft is commanded by the AI ​​or a human.

with an actor is used, can not find the back

sorry for my English and my lack of coding
thanks

FG28_Kodiak
04-12-2012, 09:34 PM
Example:

if (actor is AiAircraft)
{
for (int i = 0; i < (actor as AiAircraft).Places(); i++)
{
if ((actor as AiAircraft).Player(i) != null)
{
// Actor has Player
}
}
}

Fer912
04-13-2012, 02:01 AM
thanks