ID:155027
 
Im using the bump proc to delete stuff that gets hit by fire. but I only want the fire to kill mobs, not obj or turf, this is my code:

fire
Bump(mob/M)
del M

I thought that the mob/M would limit it to mobs but its not working, does this work some other way?
Putting mob/M in the arguments is only typecasting M as a mob. You'll want to actually check it's type instead of just telling the code to treat M as a /mob.

fire
Bump(mob/M)
if(istype(M, /mob)) del M
In response to ANiChowy (#1)
thank you, would that code work on obj and turf to?
In response to Redxam1112 (#2)
Naturally.

Excerpt from the DM Reference:

"
Format:
istype(Val,Type)

Returns:
1 if Val is derived from Type; 0 otherwise.

Args:
Val: An object instance.
Type: An object prototype or instance. If no type is specified and a variable was passed in as the first argument, it will default to the declared type of the variable.
"