I know this is a 2 in 1 topic but i cant figure it out by my own.
Editor: PlayCanvas | HTML5 Game Engine
I got the editor link above, so my problems are
the enemies share the same hp pool on the healthbar of the enemy is the script where the enemy can recieve damage i trigger this event onCollision but how can i ensure that it only trigger on the enemy actually “hit”?
If i activate my enemy spawner the first one spawning is working like intended but after the next spawn cycle i get a error that the progressImage (the part of the healthbar im manipulating to indicate enemy health) is undefined but why?.. i made it a attribute and dragged the image onto it so if make a prefab out of the enemy it should work right? or do i have to asign it via code?