combat_obj
antelope
shield
icon = 'ant_shield.dmi'
icon_state = "4"
step_size = 16
New(player/p)
..()
owner.overlays += src
owner.shield = src
Del()
owner.overlays -= src
owner.shield = null
world << "delete is being called"
..()
Move()
..()
proc
refresh_shield()
world << "refreshing"
icon_state = "[owner.shield_life]" //or shield
world << "icon_state = [owner.shield_life]"
activate()
world << "icon_state = [owner.shield_life]"
owner.shield_life--
refresh_shield()
http://pastebin.com/DaGeiHhN (How new shield is called, if needed...)
Problem description:
How do you change a datums icon_state from INSIDE a datum? My refresh_shield() proc only "flicks" the icon_state for a second, then it goes back to the original default icon_state("4").
Debugging of "icon_state" is outputting correctly. o.O.
I feel kinda cheap though, it was somewhat of an educated last resort guess. I may delete this thread in the morning. Though I wouldn't mind an explanation as to why setting a datum's icon_state at compile_time would cause this type of behavior.