ID:139119
 
Code:
        Kunai
icon='Kunai.dmi'
icon_state="Land"
density=1
Quantity=1
weapon=1
Bump(mob/M)
src.icon_state="Land"
src.Frozen=1
M.Health-=3
Bump(turf/T)
src.icon_state="Land"
Bump(obj/Weapons/O)
if(O.density==1)
src.icon_state="Land"
src.Frozen=1
O.Frozen=1


Problem description:
Whenever that Kunai Bumps into me(i run into it to test) it ffreezes me....i tried fixing it and the only way i could was to delete the O.Frozen=1
...Can someone explain the problem please?Why is my mob considered an obj?
Well first I'll note that if(O.density == 1) is redundant because the only way for the kunai to bump something is both objects are dense. My questions to you are.

1. Are thrown objects supposed to keep going forever until they bump something? Is that intentional? If not, freezing the objects is unnecessary.

The thing I think that is happening is that it's not finding the Bump(mob/M) to be true. The game thinks that you are an object for whatever reason.
In response to Lugia319 (#1)
The reason i'm making it freeze O is because of a clash of 2 weapons,whether its shurikens and kunais or 2 kunais...if they hit each other they both fall and don't move.

I see no reason for the game to think im an object O.O
In response to Kidpaddle45 (#2)
Try this

Bump(A)// When "A" is bumped 
if(ismob(A)) // If A is a mob
mob/M = A // Set M = A
M.Hp -= 3 // Subtract HP
if(istype(/obj/weapon) // If A is an object that is a weapon
obj/O = A // Set O = A
src.Frozen = 1 // Freeze both objs
O.Frozen = 1
In response to Lugia319 (#3)
Since it worked i'll go with that than.
Thank you.=D
In response to Kidpaddle45 (#4)
No probs. I added some comments but it was pretty self-explanatory. Still there if you want to check.

I find that using that setup for Bump() makes life a lot easier when trying to do stuff.