Tower Defence Targeting

ratbumratbum Member Posts: 18
edited November -1 in Working with GS (Mac)
I am creating a tower defence game, most of it is built, I have two quite (translation: incredibly) important issues in making it.

I don't know how to spawn a wave of enemies that follows a set path.

I don't know how to make the tower aim and shoot at the enemy, one guy has suggested using trigonometry, whilst I understand trigonometry, I have no idea how to do this.

Could somebody please help?

Comments

  • foxnettfoxnett Member Posts: 47
    @ratbum
    I have do an gamesalad example for you.
    You can download it at:
    http://dl.getdropbox.com/u/818318/Example.gameproj.zip
    I hope this can help you
  • ratbumratbum Member Posts: 18
    I have created 4 actors, named UpWall, DownWall, and so on and so forth.

    The reason I do not just have one wall actor with a rotate 270º is that I want my actors to stay the same way up, as they look ridiculous as soon as they are rotated.

    I want the enemies to go in the direction that is the prefix, for some reason they seem to completely ignore it.

    The "code" is as follows:

    IF [Enemy] collides with [UpWall] Then
    Change velocity <90º> relative to [actor]
    Speed <30>
    END IF

    Why might this not work?
  • ratbumratbum Member Posts: 18
Sign In or Register to comment.