Seperate namespace for cloned actors

You must understand the Game Editor concepts, before post here.

Seperate namespace for cloned actors

Postby akr » Sun Oct 03, 2010 9:27 pm

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
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

Re: Seperate namespace for cloned actors

Postby skydereign » Sun Oct 03, 2010 9:32 pm

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

Re: Seperate namespace for cloned actors

Postby akr » Sun Oct 03, 2010 9:44 pm

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?
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

Re: Seperate namespace for cloned actors

Postby skydereign » Sun Oct 03, 2010 9:49 pm

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

Re: Seperate namespace for cloned actors

Postby akr » Sun Oct 03, 2010 9:58 pm

Skyreign, thx! Each clone actor should have its own xant variable. How would u do this?
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

Re: Seperate namespace for cloned actors

Postby skydereign » Sun Oct 03, 2010 10:31 pm

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

Re: Seperate namespace for cloned actors

Postby akr » Sun Oct 03, 2010 10:42 pm

Sky, that was what I was looking for. Thanks a lot!!!
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest