mob/Monsters
var/mob/Target
enemy
icon = 'enemy.dmi'
icon_state = "enemy"
Level = 1
Str = 10
Def = 5
Maxlife = 50
Exp = 5
Gold = 1
step_size = 15
Bump(mob/M,)
if(M.client)
M.Hurtme(src.Str)
Problem description:just trying to make monsters inflict damage when they bump into a mob but im getting a runtime error when they bump into walls i believe:
runtime error: undefined variable /turf/wall/var/client
proc name: Bump (/mob/Monsters/enemy/Bump)
usr: (src)
src: the enemy (/mob/Monsters/enemy)
src.loc: the tunnelfloor (22,40,1) (/turf/tunnelfloor)
call stack:
the enemy (/mob/Monsters/enemy): Bump(the wall (22,39,1) (/turf/wall))
the enemy (/mob/Monsters/enemy): Move(the tunnelfloor (22,40,1) (/turf/tunnelfloor), 2, 0, -13)
the enemy (/mob/Monsters/enemy): Wander()
the enemy (/mob/Monsters/enemy): New(the tunnelfloor (22,41,1) (/turf/tunnelfloor))
You'll want to check the variable using a runtime method like istype() or ismob()