mob
verb
Attack(mob/M as mob in oview(1))
var
damage = usr.strength - M.defence
if(damage <= 0)
usr << "[M] absorbs your attack!"
M << "You absorb [usr]'s attack."
else
M.health -= damage
view() << "[usr] attacks [M] for [damage] HP!"
M:deathcheck()
mob
proc
deathcheck()
if(src.health <= 0)
view() << "[src] was killed by [usr]!"
usr.experience += 5
del(src)
Problem description:
ok pretty simple. can someone please tell me how to make the mob attacking have an attack icon. if your up for some extra credit please let me know how to make the mob being attacked have a "being hit" icon.
um, please dont tell me to read any tutorials because this in itself is a tutorial section.
Thank you
M.icon_state = "Hit"
Basically, add the hit state in the icon file, name it attack. And create a backup thing most people have as oicon_state or base_icon_state, and a backup for the icon like, base_icon. If this is not already implemented, tell me so and I'll give you some help on it.