im having collision problems with the stickman. before it even touches him all three hearts disappear.
the collision is fine in native platform (although) the all hearts disappear. collision masks have nothing wrong with them too
n i have deleted recent events but the same problem arises
mega.co.nz/#!XFc1CJiD!UDdtcKWoz … TMhqjuBPD8
All the hearts are removed because you are telling GD to do it everywhere!
Let me explain:
- You use the “For each Heart” loop, so GD will check the collision with the Bomb for each Heart, if you would remove just one Heart, you do it for every Heart = remove all Hearts
- In the event conditions, you add “Consider all Hearts”… the actions to delete Hearts will delete all considered Hearts (all) = remove all Hearts
- The condition “Trigger once” is needed, because although you solve both previous points (when a Bomb collides remove just one Heart), the collision check will return True again in the next frame and delete another Heart, again, and again = remove all Hearts
Finally, a system to select wich Heart to be deleted should be added. For example I added the action “Take a random Heart” just before delete the Heart, but of course it deletes a random Heart. Maybe a scene variable “hearts” and an object variable of Hearts “ID”, then:
Conditions: Bomb is in collision with Stickman, Heart.Variable(ID) = Variable(hearts), Trigger once
Actions: Delete object Heart
i deleted the consider all hearts n the loop before sending you the file. i musta sent you n old version. what i did is put “take random heart” n then i put the
‘Conditions: Bomb is in collision with Stickman, Heart.Variable(ID) = Variable(hearts), Trigger once
Actions: Delete object Heart’
it still will take a random heart but i dont mind as long as it just takes one lol .
but the biggest problem is that it still will delete the heart b4 it even touches the stickman. i fixed the collision mask n everything. it does work on native