How to fix this basic enemy respawn script?
Very new to scripting/unity in general and I am not sure what I am doing.
I am using a basic cube gun right now to lower their health. The bullet collides and triggers with the enemy and lowers it's health.
This script is giving me a lot of trouble where 1. The enemy will recover mid-air and start flying towards the player 2. Because the enemies share the same health int it causes a lot of bugs (not sure how to fix)....
I am not trying to destroy the game objects- I just want them to lay idle on the ground for now, unable to be affected by additional triggers.
Answer by MagnaDever · Jun 05, 2018 at 08:09 AM
2)Because you created enemy again. Don't instantiate, move it. About mid-air, i not see problem, but instantiated transform position can be upper then you need