Geting the parent of an actor

Talk about making games.

Geting the parent of an actor

Postby gonso » Fri Aug 06, 2010 12:47 pm

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.
gonso
 
Posts: 2
Joined: Fri Aug 06, 2010 12:24 pm
Score: 0 Give a positive score

Re: Geting the parent of an actor

Postby savvy » Fri Aug 06, 2010 1:36 pm

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.
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Geting the parent of an actor

Postby DilloDude » Fri Aug 06, 2010 2:13 pm

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).
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: Geting the parent of an actor

Postby Game A Gogo » Fri Aug 06, 2010 2:31 pm

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
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Geting the parent of an actor

Postby gonso » Fri Aug 06, 2010 3:08 pm

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
gonso
 
Posts: 2
Joined: Fri Aug 06, 2010 12:24 pm
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest