Page 1 of 1

Switch Path on creation, or new actor??

PostPosted: Sat Apr 21, 2007 4:02 pm
by d-soldier
SEE PIC FOR BETTER UNDERSTANDING:

So What I'm trying to do is have my floating platfrom spawn little suicide-bombing drones when the player is on it. This was easy to do of course. Now the problem is, I want these little drones to come from both sides of the platfrom (set up on a path) which works fine for the right side... But I want every other drone (created by the platfrom) to alternate which path it uses on it's creation (left path or right path)... Is this possible through a script? Or do I need to create an entire different actor of the little drone for each side (as clones can't be used for the actor creation from the platform)?

PostPosted: Sat Apr 21, 2007 4:54 pm
by Sgt. Sparky
make a global variable called direct
and on the create actor event of the drones,

Code: Select all
direct += 1;//or you could use direct++;
if(direct > 1)direct = 0;
if(direct == 1)ChangePath("Event Actor", "left", BOTH_AXIS);
if(direct == 0)ChangePath("Event Actor", "right", BOTH_AXIS);

:D
that should work. :)

Ahh!

PostPosted: Sat Apr 21, 2007 6:23 pm
by d-soldier
Sparky is the man. Works like a charm once I got rid of all the drone's change path actions. Thanks so much - +point to you!

PostPosted: Sat Apr 21, 2007 6:24 pm
by Sgt. Sparky
:D
thanks. :D:D:D:D:D
*sends my smiley faced soldiers after you*
:twisted: