toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
How do I make an AI walk down a path?
FungoEntertainment
Member
Posts:
36
April 2010
edited November -1
in
Working with GS (Mac)
I'm making a tower defense game, and I need to make the enemies walk down the curled path. Help, please!
Comments
quantumsheep
Member
Posts:
8,188
April 2010
Why not make a tower attack game? You know, for fun?
If you do want your actors to follow a path, set up other actors as invisible blocks - you'll need four - call them 'up', 'down', 'right', 'left'.
On your enemies that are moving, put in a rule:
If you hit 'up' move up
If you hit 'down' move down
If you hit 'right' move right
If you hit 'left' move left
Then just position the blocks where you want them, and when the enemies hit the blocks, they should move in the right direction.
I think this was first suggested by JGary, but I could be wrong...
Hope that helps,
QS
Edit: Just noticed you wrote *curled* path - in which case I have NO idea
FungoEntertainment
Member
Posts:
36
April 2010
Yes, sorry, I DID mean to say curved. You know.. a left turn, right turn... I didn't mean in a 'curled' which would mean it goes in circles. Sorry. Thanks for the quick reply.
Sign In
or
Register
to comment.
Comments
If you do want your actors to follow a path, set up other actors as invisible blocks - you'll need four - call them 'up', 'down', 'right', 'left'.
On your enemies that are moving, put in a rule:
If you hit 'up' move up
If you hit 'down' move down
If you hit 'right' move right
If you hit 'left' move left
Then just position the blocks where you want them, and when the enemies hit the blocks, they should move in the right direction.
I think this was first suggested by JGary, but I could be wrong...
Hope that helps,
QS
Edit: Just noticed you wrote *curled* path - in which case I have NO idea