Im havin a heck of a time tring to turn my walls and brigdges into rubble in fact i used a tutorial/demo/library to help me and it just dont work !
proc/checkdeath()
if(src.health<=0)
src.icon='wall.dmi'
src.icon_state="rubble"//rubble wall
src.density = 0
src.opacity = 0
else
return..()
With this code it doesnt change the icon state instead the HP keeps going lower
ID:149338
May 20 2002, 10:23 am
|
|
Charlesisdapimp wrote:
Im havin a heck of a time tring to turn my walls and brigdges into rubble in fact i used a tutorial/demo/library to help me and it just dont work ! Your code looks sound--except for the fact that "else return ..()" is totally unnecessary (you can't call a default proc if there isn't one). I suspect your problem is somewhere else: Probably this proc isn't being called when health changes. Lummox JR |
mob/proc/DeathCheckForWalls(mob/M as mob)
if(M.health <= 0)
var/newicon = "rubble"
M.icon_state = newicon
M.density = !density
M.opacity = !opacity