Next Waypoint
specialist_3
Member Posts: 121
Hi,
I am currently working on a tower defense game. Its come out well so far. But as always, I have hit the next road block. Basically, I have a particular creep type say XY. Now XY can only be killed completely using an XY-type weapon. If I use an X-type weapon, the creep will break down to Y and continue moving till its shot down by a Y-type weapon. And if I use a Y-type weapon, XY will break down to an X and will still continue its run till shot down by X-type weapon. As mentioned if I use XY-weapon, the creep dies completely without breaking down.
The challenge here is with the waypoint. So far in my maps, I have manually keyed the next navigation point the creeps must head towards before moving to the next. Example,
If, creep reaches (10,20), then move to (20,30)
If, creep reaches (20,30), then move to (30,40) and so on.
The problem is what if XY is broken down to either X or Y (they are spawned from the dead body of XY) in between any of these navigation points. They will remain where they are spawned without knowing where to go next. How can I tackle this challenge?
Thanks!!
I am currently working on a tower defense game. Its come out well so far. But as always, I have hit the next road block. Basically, I have a particular creep type say XY. Now XY can only be killed completely using an XY-type weapon. If I use an X-type weapon, the creep will break down to Y and continue moving till its shot down by a Y-type weapon. And if I use a Y-type weapon, XY will break down to an X and will still continue its run till shot down by X-type weapon. As mentioned if I use XY-weapon, the creep dies completely without breaking down.
The challenge here is with the waypoint. So far in my maps, I have manually keyed the next navigation point the creeps must head towards before moving to the next. Example,
If, creep reaches (10,20), then move to (20,30)
If, creep reaches (20,30), then move to (30,40) and so on.
The problem is what if XY is broken down to either X or Y (they are spawned from the dead body of XY) in between any of these navigation points. They will remain where they are spawned without knowing where to go next. How can I tackle this challenge?
Thanks!!
Comments
Hachiko, thanks mate. I considered your suggestion but that can be an extremely tedious process. Imagine I am having a rectangular maze that spirals inwards in 3-4 layers. It will be tougher with a circular one.