Page 1 of 1

check if actor has a parent?

PostPosted: Sun Aug 26, 2012 4:13 pm
by Fojam
is there a way to check if an actor has a parent?

Re: check if actor has a parent?

PostPosted: Sun Aug 26, 2012 10:47 pm
by skydereign
Invalid actors in gE have a name equal to "" and cloneindex of -1. Every actor can use the parent reference, even if the parent actor doesn't exist (invalid).
Code: Select all
if(parent.cloneindex!=-1) // has a parent