Page 1 of 1

parent of colliding actor

PostPosted: Wed Nov 02, 2011 6:49 pm
by Agusstosus15
is it possible to find a parent of a colliding actor?

Re: parent of colliding actor

PostPosted: Wed Nov 02, 2011 8:38 pm
by skydereign
Not through normal means. Usually what I end up doing is creating an actor variable that stores the cloneindex of the parent actor (I actually don't store the parent, but rather the creator). So you set that when you parent the actor, that way you can use collide.p_index to get the index. If, you also need to store a name, I'd suggest either making a function that takes an int, or create an array of strings. That way you can use an integer to store the actor type. So, your player might have a_type (actor_type) of 1, while your tiles would have 2... and so on.

Re: parent of colliding actor

PostPosted: Thu Nov 03, 2011 12:48 am
by Agusstosus15
once again sorry for my delayed replies and thanks for explanations