Pinning sprites to physics objects. Destroy only 1

0 favourites
  • 3 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
  • I have been trying to get my bad guys into my game.

    Rocks fall from an area and hit the monster sprites, and the monsters should get smashed, and remove the sprites from the screen.

    I have them all working properly when the animated sprite is the physics object. When I try to change the physics object to a static, non-animated sprite, and pin the animated sprite to the static sprite, Every instance of the monsters gets destroyed on collisions with the rocks now.

    Is there another to adjust the physics object, so only the instance that gets struck by the rock gets removed?

    Thanks for any help. I have been going over the forums and tutorials off and on all afternoon. It would be really great to get this solved tonight.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like its destroying all instances because its picking all of them during the collision. Try adding a sub event and use "pick nearest" and destroying that one

    eg:

    rock on collision with monster

    (sub event) pick nearest monster - > destroy

  • That is a great tip justifun. Thank you, I am going to try that now.

    I was just coming back to say I found a little workaround. I had the rock spawn a cartoon "POW" sprite, and the "POW" sprite destroy the instance.

    I like your way better though justifun. It sounds a lot more elegant simple. I would rather not have my special effects colliding with things. :)

    Thanks very much :)

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