ID:144989
 
Code: Spell
    Spin(obj/sword in oview(6))
sword.icon = 'weapon.dmi'
sword.icon_state = "spin"


Problem description: I'm trying to replace the icon, not add one, what am I doing wrong? Also, is there a way to add a area onto it?


try this
mob/proc/Spin(var/obj/sword/S in oview(6))
S.icon='weapon.dmi'
S.icon_state="spin"

if its an animation use flick()
mob/proc/Spin(var/obj/sword/S in oview(6))
flick("spin",S) //Requires that the sword icon be equal to the icon with the spin state

try that
In response to Shlaklava
Thanks, but that put an icon over it, and didn't replace it. I want the sword icon to not be there, and the spin icon to repeat indefinately.
In response to Shlaklava
try this edited version (i forgot to add something)

mob/proc/Spin(var/obj/sword/S in oview(6))
S.icon_state="spin


Just use that
In response to Shlaklava
S.icon_state:undefined var
In response to Pakbaum
forgot the little " on the end...my bad...
In response to Shlaklava
Hehe, I fixed that, but it says it's undefined still, any ideas?
In response to Pakbaum
mob/proc/Spin()
for(var/obj/sword/S in oview(6))
S.icon_state = "spin"
In response to Pyro_dragons
Uh oh . Thar be usr, cap'n.
mob/proc/Spin()
for(var/obj/sword/S in oview(src,6)) // src = center
S.icon_state="spin"
In response to Mysame
Ah! It works now, only 1 problem. ALL swords on the screen spin, whereas I just want the one activated to spin.