How do I make an AI walk down a path?

FungoEntertainmentFungoEntertainment Member Posts: 36
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

  • quantumsheepquantumsheep Member Posts: 8,188
    Why not make a tower attack game? You know, for fun? :D

    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 :D

    Edit: Just noticed you wrote *curled* path - in which case I have NO idea :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • FungoEntertainmentFungoEntertainment Member Posts: 36
    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.