RTS enemies x, y position overlap from table
Posted: Sat Sep 07, 2024 1:46 am
Hi, I'm continuing work on this RTS project but have run into another problem....
Currently I am trying to make a working enemies module that has option for both ranged and melee minions. The logic to make them move and attack has been done. The program on the press of the spacebar will spawn a minion that will go and attack the user
Problem is: seems that all the minions have the same x, y if you spam space. I dont know how to stop them all occupy the same space.
I also cant seem to make them spawn from the spawn point consistently. After the first minion is spawned they seem to spawn on that initial minions current location rather than at the spawn point.
what should be happening: after spawning at the spawn point minions move to engage the user. No enemies are overlapping and all occupy their own space around the user.
I hope this makes sense...any help is greatly appreciated! please let me know if you need any further info or if any of the code does not make sense )
PS feel free to use this code if you stumble across it. hope it helps
Currently I am trying to make a working enemies module that has option for both ranged and melee minions. The logic to make them move and attack has been done. The program on the press of the spacebar will spawn a minion that will go and attack the user
Problem is: seems that all the minions have the same x, y if you spam space. I dont know how to stop them all occupy the same space.
I also cant seem to make them spawn from the spawn point consistently. After the first minion is spawned they seem to spawn on that initial minions current location rather than at the spawn point.
what should be happening: after spawning at the spawn point minions move to engage the user. No enemies are overlapping and all occupy their own space around the user.
I hope this makes sense...any help is greatly appreciated! please let me know if you need any further info or if any of the code does not make sense )
PS feel free to use this code if you stumble across it. hope it helps