Hi guys,
I've got a problem with spawning enemies while multiple spawners are in player's range.
I want to spawn one enemy whenever player gets near the spawner (in my example - less than 100px).
Everything works fine when there is only one spawner within the player's 100px range (one enemy is properly spawned), but whenever more than one spawner is in player's range the enemies are spawning endlessly from all spawners except the first one.
I've tried different approaches for measuring distance like:
- System - distance(player.X, player.Y, spawner.X, spawner.Y) less than 100
- above method, but with changing spawner's local variable "lod" to "1" when player is in range
- using "line of sight" behaviour on spawners
but all these methods produce the issue I mentioned earlier.
I've tried also different ways to spawn enemies but without success
- System - create object
- spawner - spawn
my events with all 3 methods of spawning
and illustration of the issue
It seems I'm missing something so any help would be much appreciated