I'm currently working on a script which should turn into a tower defense mini game.
When entering the game, a random count of monsters (1 id, several monsters) are spawned and should walk toward a given point (npc GID or corrdinates).
If they reach the point, you loose.
Actually the script works pretty well on each point...except the walking part.
I'm able to force monsters to walk using unitwalk, but not for more than 20 cells in a direction.
From then, several points:
1) I can increase the cell count. Would probably takes lot of mem to calculate the path, and that's not really a good point
2) I can set n npcs along the path, but then, I'll need the GID of each touching monster to send it to npc n+1. But there's no way I can get this GID except at spawn, and I can't bind them to "touching npc" ones.
3) I can simply suicide myself...
Does anybody have an idea on how I can manage that problem?
Hi guys!
Here's a little question I got.
I'm currently working on a script which should turn into a tower defense mini game.
When entering the game, a random count of monsters (1 id, several monsters) are spawned and should walk toward a given point (npc GID or corrdinates).
If they reach the point, you loose.
Actually the script works pretty well on each point...except the walking part.
I'm able to force monsters to walk using unitwalk, but not for more than 20 cells in a direction.
From then, several points:
1) I can increase the cell count. Would probably takes lot of mem to calculate the path, and that's not really a good point
2) I can set n npcs along the path, but then, I'll need the GID of each touching monster to send it to npc n+1. But there's no way I can get this GID except at spawn, and I can't bind them to "touching npc" ones.
3) I can simply suicide myself...
Does anybody have an idea on how I can manage that problem?
Thanks!
Edited by AlayneShare this post
Link to post
Share on other sites