Page 1 of 1

Seperate namespace for cloned actors

PostPosted: Sun Oct 03, 2010 9:27 pm
by akr
When I clone actors all use the same namespace. Means if i modify a local variable all actors get it.

Is there a way to have a seperated name space for each actor?

andreas

Re: Seperate namespace for cloned actors

PostPosted: Sun Oct 03, 2010 9:32 pm
by skydereign
Well there is the clonename variable as well. It is name.cloneindex, which is the unique way to get clones. You can use this with Actor *s to better deal with clones.

Re: Seperate namespace for cloned actors

PostPosted: Sun Oct 03, 2010 9:44 pm
by akr
I need to save the old position of the clone to be used later: xant=x;

But this produces nonsense because all actors use the same "xant". Any ideas?

Re: Seperate namespace for cloned actors

PostPosted: Sun Oct 03, 2010 9:49 pm
by skydereign
Is xant an actor variable? Not quite sure what you are trying to do, I think my first guess was wrong. Do you want to store only one xant, or one for each clone?

Re: Seperate namespace for cloned actors

PostPosted: Sun Oct 03, 2010 9:58 pm
by akr
Skyreign, thx! Each clone actor should have its own xant variable. How would u do this?

Re: Seperate namespace for cloned actors

PostPosted: Sun Oct 03, 2010 10:31 pm
by skydereign
Just make the variable an actor variable. You have to create it with gameEditor's Variable button found in script, but when you create it just look for the global, and switch it to actor.

Re: Seperate namespace for cloned actors

PostPosted: Sun Oct 03, 2010 10:42 pm
by akr
Sky, that was what I was looking for. Thanks a lot!!!