ID:157336
 
mob
verb
Slash(mob/M as mob in get_step(src,src.dir))
set category="Fighting"
if(istype(M,/mob/))
flick("slash",usr)
var/damage=round(usr.str-M.def/2)
if(damage <= 0)
damage = 1
M.hp-=damage
say()<<"[usr] attacked [M] with his fury inflicting <font color=red>[damage]</font> damage!"
M.Death(usr)
else
return


Obviously flick replaces the mob. So what could I do to this code to make it do the same thing as flick, but without replacing the mob?
check the spelling of the icon_state and make sure it matches
flick() does not "replace the mob". What are you talking about?
In response to Garthor
It is spelled right and everything, and I think on the Byond DM Reference thing even says that it replaces it.
In response to Y1p33y0
flick()
Cause the icon attached to Object to be temporarily replaced with the specified icon or icon state for the duration of the animation. This is a purely visual effect and does not effect the actual value of the object's icon variable.

---


Is it in the Same DMI file as the current icon the mob has ?


Edit: sorry though there was actually an error, never mind lol.
In response to Pirion
Are you sure thats even the error?
In response to Pirion
Pirion wrote:
flick()
Cause the icon attached to Object to be temporarily replaced with the specified icon or icon state for the duration of the animation. This is a purely visual effect and does not effect the actual value of the object's icon variable.

---


Is it in the Same DMI file as the current icon the mob has ?


Edit: sorry though there was actually an error, never mind lol.

its not the same dmi, and what error?
In response to Y1p33y0
No I though you had a problem that you were looking for an answer to, i re-read the main post and there wasn't an error, just misunderstanding of flick. - although if its not in the same DMI its probably not showing the correct icon state as you didn't switch the DMI also.
In response to Pirion
Pirion wrote:
No I though you had a problem that you were looking for an answer to, i re-read the main post and there wasn't an error, just misunderstanding of flick. - although if its not in the same DMI its probably not showing the correct icon state as you didn't switch the DMI also.

It does exactly what I want it to do, except that it makes mob disappear during the animation of the flick.
In response to Y1p33y0
oh, then I retract my retraction.

If they are in different dmi files i believe you have to run flick 2 times, once for the icon file, once for the icon state.

flick('file.dmi',usr)
flick("slash",usr)
In response to Pirion
that didnt work either
In response to Y1p33y0
You might receive better help if you actually took the time to tell us what is going wrong.