View unanswered posts | View active topics It is currently Thu Dec 26, 2024 3:59 am



Reply to topic  [ 2 posts ] 
 Determine if Actor is of type AHuman 
Author Message

Joined: Sun Feb 17, 2013 8:14 am
Posts: 1
Reply with quote
Post 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


Mon Feb 25, 2013 3:09 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post 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.


Mon Feb 25, 2013 6:14 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.038s | 13 Queries | GZIP : Off ]