parent of colliding actor

Game Editor comments and discussion.

parent of colliding actor

Postby Agusstosus15 » Wed Nov 02, 2011 6:49 pm

is it possible to find a parent of a colliding actor?
Agusstosus15
 
Posts: 59
Joined: Sun Oct 09, 2011 7:59 pm
Score: 0 Give a positive score

Re: parent of colliding actor

Postby skydereign » Wed Nov 02, 2011 8:38 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: parent of colliding actor

Postby Agusstosus15 » Thu Nov 03, 2011 12:48 am

once again sorry for my delayed replies and thanks for explanations
Agusstosus15
 
Posts: 59
Joined: Sun Oct 09, 2011 7:59 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest