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.
Develop games in your browser. Powerful, performant & highly capable.
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
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 :)