Jump to content
Datiel12

Multiple instances of the same Spriter Object [Construct 2]

Recommended Posts

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

HzeiU6W.png

 

kgfum2c.png

 

nEuHd4m.png

 

 

https://streamable.com/jti4i Is an example of what I'm talking about..

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...