Switch Path on creation, or new actor??

Talk about making games.

Switch Path on creation, or new actor??

Postby d-soldier » Sat Apr 21, 2007 4:02 pm

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)?
Attachments
pr_help1.jpg
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 4:54 pm

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. :)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Ahh!

Postby d-soldier » Sat Apr 21, 2007 6:23 pm

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!
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 6:24 pm

:D
thanks. :D:D:D:D:D
*sends my smiley faced soldiers after you*
:twisted:
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron