Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   help actor (http://forum.fulqrumpublishing.com/showthread.php?t=31071)

Fer912 04-12-2012 07:56 PM

help actor
 
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:
Code:

            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


All times are GMT. The time now is 12:20 PM.

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