Issue with Fire Breath and Burning Effect Not Working Properly with Multiple Enemies

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I have an enemy and his fire breath as a child; both will be created together.

    The fire breath will be visible and collision enabled only if the hero is in the LOS of the enemy.

    I made a burning fire which will be spawned if the hero gets caught in the enemy's fire breath. That burning animation will hide once the hero is out of the LOS of the enemy.

    The problem is, hero burning is working perfectly only if one enemy is on the screen, but it's not working if we have multiple enemies.

    I tried to use "For Each" for enemy fire breath, but that's also not working.

    Please help me solve this.

    Event:

    Error Video: webmshare.com/play/8PmBn

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • One option to simplify it is to have enemy_impact existing the whole time pinned to the player then say, if player is overlapping enemy_fire then set enemy_impact visible else set enemy_impact invisible.

    If you have to go with the spawning, the trigger once can cause issues with multiple instance picking. You can try this : if player is overlapping enemy_fire and enemy_impact is not present, then spawn enemy_impact. And if player is not overlapping enemy_fire, destroy enemy_impact.

  • Thanks for the effort!

    I fixed it like this

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)