Page 1 of 1
Geting the parent of an actor
Posted:
Fri Aug 06, 2010 12:47 pm
by gonso
How can I get a pointer to the parent of the actor given a pointer to the actor?
It seems that there is no ->parent member in the Actor struct.
Re: Geting the parent of an actor
Posted:
Fri Aug 06, 2010 1:36 pm
by savvy
that post makes no sense to me, i could probably help you but...can you expand and simplify please, and tell us exactly what the problem is.
Re: Geting the parent of an actor
Posted:
Fri Aug 06, 2010 2:13 pm
by DilloDude
I'm pretty sure you can't. However, you could create another actor variable to store the parent (such as a string - store the parent's clonename, and use getclone).
Re: Geting the parent of an actor
Posted:
Fri Aug 06, 2010 2:31 pm
by Game A Gogo
the only thing you can do is something like
- Code: Select all
DestroyActor("Parent Actor");
so you can use Parent Actor in any function that needs the string of the actor name.
But, you can't do
- Code: Select all
parent.x=5;
it won't give you errors, but it won't work either
Re: Geting the parent of an actor
Posted:
Fri Aug 06, 2010 3:08 pm
by gonso
I was trying to store the Actor's parent in a global variable when the actor is created, so that I can access it later even in sombody elses event.
I will look for another way to do it.
Thanks