I have an enemy sprite, set to invisible and the actual animated sprite set to the x,y location of the invisible one. I have no issues with the individual movements if there are more than one of these enemies on the screen. The problem is the animations and hit points.
Each enemy has hp and will flash when hit. If one of these enemies dies, the rest stop flashing when hit. The same goes for animation in general. The Variables are attached to the controlling invisible sprite.
I think I'm screwing up my "For Each" and SpriteX Parent= SpriteY crap. I have all actions set to the controlling sprite. The animation sprite is only for show.
For example, when the enemy is getting hit I have:
[Bullet group] On collision with [WolfControlSprite]
[WolfSprite] parent = [WolfControlSprite.UID]
[WolfSprite] Flash:Flash0.1 on 0.1off for 1 seconds
[WolfControlSprite] Set Hit to 1
[System] Wait 1.0 seconds
[WolfControlSprite] Subtract 1 from HP
[WolfControlSprite] Set Hit to 0
I realize I can use <>[WolfSprite] Flash here but I like to use variables in these situations.
The problem here is that it can randomly subtract the hp from another sprite instance. If I use "For Each" here it really messes things up.
Thanks for any help in advance!