Here is the script/level:
In the level script I put 'v(nharm)=npc(b).id' I put the .id to make it easy for me to see what happens, the script tries to send the id of the npc that harms the player, In my recommendation this would make it more useful than just that.
Why is it problematic?:
* I must write all the npc that do not count in the list, which is a very long list (the npc can change properties depending on the level and would change the list)
* If in case the player collides with two npc for example the npc 215 (which has no collision but is friend = 0) with another enemy npc, the situation is dependent on which element (npc) was placed first in the level, I already I tested it
* If I am colliding with an npc block or grabbing an npc there may be problems.
In this example you can fail:
the ghost is the npc-44, the tube is the npc-67 and the block mushroom is the npc-155, look at the gif image.
The nharm variable should only return 44 (id of the npc that harms the player)
- Spoiler






