Datiel12 Posted May 26, 2019 Report Posted May 26, 2019 Hi, I've been facing a problem. So I have 2 spriter objects. Player and Enemy, and I have the spriter objects pinned to a PlayerMask and EnemyMask respectively. When the masks are spawned they will spawn the player or enemy. So I have values and platform behaviors tied to the masks, and when the health of the enemies reach zero they'll be killed and dissapear. The problem is with multiple enemies when the health reaches zero, they'll all play the death animation and dissapear. I've read online about the issue but most hadn't really worked. Is there a way to fix it? Here is the event triggered when the enemy is killed https://streamable.com/jti4i Is an example of what I'm talking about.. Quote
Mike at BrashMonkey Posted May 26, 2019 Report Posted May 26, 2019 We'd need to see the code, not the running game to be able to possibly help. Datiel12 1 Quote
Datiel12 Posted May 27, 2019 Author Report Posted May 27, 2019 16 hours ago, Mike at BrashMonkey said: We'd need to see the code, not the running game to be able to possibly help. I added the code in the thread, wasn't able to reply cause of the wait time.. Quote
Mike at BrashMonkey Posted May 28, 2019 Report Posted May 28, 2019 I think it's because you are calling functions... the functions don't know which enemy you are referring to as it's not a sub-event of the original event that detected the collision wit ha specific enemy. I suggest you re-structure the logic to use sub events instead of functions. This also seems to be a purely Construct based issue (not a bug, but learning the intended use/logic structure) and not specific to Spriter. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.