Bullet collision stops working



  • Does anyone feel like helping me debug an issue? Silly tower defence game, and I’m still trying to figure this program out!

    Starts off Ok, and the worms detect the bullets. After a while - they stop responding to the shot event.

    Feature request number one for me is some sort of logger - so you can put log commands in and see some sort of debug output.

    Thanks!



  • @leewsimpson I had a look and I think I've figured it out mostly. It's not working because the worms are waiting to be hit by a bullet from a specific behaviour, which is the shoot behaviour in the ORIGINAL tower, not the spawned ones. For example: move your original tower that's outside the screen into the range of the worms, it will shoot and kill all of them and work fine.

    To fix it for the worms, delete your Hit by Bullet behaviour in the worms and replace it with the same thing but don't select any shoot behaviour, then they will respond to any bullet from any object that hits them.

    What confuses me the most is why the first few worms can even take damage from the spawned tower in the first place, it makes no sense they shouldn't be taking damage at all. Seems like a bug. This is why I make my own bullets instead of using shoot behaviours lol.



  • I’m not good with all the calculate distance and everything but I did notice that after it hits the first worm the bullets seem to not reach the worm completely. Like it will disappear right before hits the worm. Also looks like the bullet is hitting the wall. Idk. My guess it has something to do with disabling the object and also on how it calculates the distance.



  • Actually that’s not true because when u turn on object boundaries it’s indeed hitting the worm.



  • Thank you so much for taking the time. Removing the specific shoot works as a good workaround.


Log in to reply