Multiple Actors Following Path Issue

adalpilscazaadalpilscaza Member Posts: 44
edited November -1 in Working with GS (Mac)
Hi,

I am currently trying to make a Tower Defense game. The enemies have to follow a path. To do the movement, I created a constant behaviour that makes the actor move to two different attributes (game.EnemyMovetoX and game.EnemyMovetoY). One determines the position on the X axis that the enemy actor should move to, and the other determines the position on the Y axis. To make the path that the enemies follow, I made actors that act as triggers for the enemies (i.e. When enemy actor collides with trigger, change attributes game.EnemyMovetoX and game.EnemyMovetoY to the position of the next trigger, and so on).

With one enemy actor, this works fine. However, when I add in more than one, they bunch up and stop in one area. I presume that this is because all the enemies are sharing the same position attributes, but I am only just beginning to use Gamesalad and can't figure out a way around this.

I hope you can understand my situation, and would be grateful if you would help me out.

Thanks.

Comments

  • MeatamirMeatamir Member Posts: 16
    It might be that they all have to be at that spot at the same time so it wont let it continue. Try making single attributes in stead of game ones.

    Hope this helps.
  • adalpilscazaadalpilscaza Member Posts: 44
    In tower defense games, each enemy usually comes at a different time, and are not all at the same location at once. Thanks for the response, though.
  • FloridaGamesFloridaGames Member Posts: 328
    change the game.enemymovex to actor.enemymovex
    and same for y cordinates
  • adalpilscazaadalpilscaza Member Posts: 44
    TacoStand said:
    change the game.enemymovex to actor.enemymovex
    and same for y cordinates

    The only issue with this is the fact that I would need to create a seperate actor for each turn trigger, rather than one actor prototype. At the momeny, I simply edit the actor after placing it in the scene. What I have done right now is put the change attribute behaviours inside the trigger actor (not prototype) rather than in the enemy actor. This allows me to have only one actor to do all of the turning in any scene.

    Thank you for the help, though...I will be trying it out now.
Sign In or Register to comment.