Fade out pinned object when another dies

0 favourites
  • 4 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • My object has pinned "spech cloud" but when object die, cloud die too. I want' to make this cloud fade out. It's not matter that object is destroyed.

    This is not working and cloud die when object die:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is the cloud object in a container with the enemy? If not then the cloud shouldn't be destroyed with the enemy, and there must be something else in your code that is destroying or moving it (check the debug to confirm that cloud is actually being destroyed).

    If the cloud is in a container with the enemy then it will be destroyed with the cloud, because that's the way that containers work. Off the top of my head here are a couple of workarounds:

    1) Rather than destroying the enemy immediately, set it to invisible and start the cloud fading; when the cloud has faded out then destroy the enemy. You will need to disable the collisions and/or use an instance boolean to differentiate the "kind of dead" enemy from living enemies so that it doesn't continue to respond to enemy events.

    2) Before destroying the enemy spawn a new "fadeCloud" object in the same position as the cloud object - this just has the fade behaviour on it and destroys at the end of the fade.

  • mekonbekon

    yes there is container, so now it's understandable.

    thanks much for another metod advice!

  • You're welcome

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