Page 1 of 1

problem with create actor

PostPosted: Wed Sep 13, 2006 1:39 pm
by Francisco
Hi, I have a problem when I want to create actors. I want to put four or more enemies with the same properties as the first one but when I change for example, the animation of the first, the second actor created changes the animation also, the changes produced on one, are produced in all the others also. I can´t put more than one enemy at the same type.

Can you help me?

Thanks.

PostPosted: Wed Sep 13, 2006 4:42 pm
by makslane
If in the action you use the name of actor, like 'enemy', the action will be executed on all enemy actors. To change a particular clone, you need to use the clone name, the 'Event Actor' actor or other special actor name.

problems

PostPosted: Wed Sep 13, 2006 5:10 pm
by Francisco
for example, I have a script for Draw Actor of an object called PAQUETE:

if (paquete.x < -6) ChangeAnimation("Event Actor", "paquete2_fix", FORWARD);

but it changes all the clones of paquete, not only this one.

and when a PAQUETE is moving to the left by a Timer:

paquete.x += -15;
PlaySound2("data/Enemy.wav", 1.000000, 1, 0.000000);

and another Timer creates a new second PAQUETE, the second PAQUETE doesn´t move, the first PAQUETE moves at double speed :(

I don´t know what to do.

PostPosted: Wed Sep 13, 2006 5:14 pm
by makslane
Try change the code to:

Code: Select all
if (x < -6) ChangeAnimation("Event Actor", "paquete2_fix", FORWARD);

a problem fixed

PostPosted: Wed Sep 13, 2006 6:02 pm
by Francisco
With this change this works correctly, thanks :)

but the second PAQUETE actor created doesn´t move and the first PAQUETE moves at double speed when there are two same actors created. But when a collision destroy the first PAQUETE actor the second actor begins to move. how could I move the two same PAQUETE actors at the same time?

If you can solve this problem I can continue my game, this is the last problem at the moment :)

Thanks again.

I hav solved the problem! :)

PostPosted: Wed Sep 13, 2006 6:20 pm
by Francisco
PROBLEM FIXED!!! :)

the same thing you said. I converted all "paquete.x" to "x" and all works well :)

Thanks for all