Data Realms Fan Forums http://45.55.195.193/ |
|
Determine if Actor is of type AHuman http://45.55.195.193/viewtopic.php?f=73&t=45154 |
Page 1 of 1 |
Author: | Kotoeb [ Mon Feb 25, 2013 3:09 pm ] |
Post subject: | Determine if Actor is of type AHuman |
Whats the easiest way to determine if Actor actually is AHuman? (not DropShip, for ex.) Also, is it possible to store actor's own variables? I mean, like: Code: for actor in actors actor.MyVariable = <value> end |
Author: | Bad Boy [ Mon Feb 25, 2013 6:14 pm ] |
Post subject: | Re: Determine if Actor is of type AHuman |
To answer your questions: 1. if actor.ClassName == "AHuman" 2. Unfortunately no. However, you can store local variables within that for loop. i.e. for actor in MovableMan.Actors do local variable = property. This can only be accessed within the for loop and there will, I think, be a different variable for each actor in the loop. If not and it does get overwritten, it doesn't really make a difference since you can't access a local variable declared in a loop outside of it anyway. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |