ID:140451
 
Code:
mob
verb
Attack()
if(src.attacking == 0)
var/obj/K = new/obj/Other/slash

src.attacking = 1
K.dir = src.dir
K.loc = src.loc
step(K, dir)
var/turf/X = K.loc
spawn(2)
del(K)
for(var/mob/M as mob in X)
if(M == src)
continue
var/damage = rand(1,attack)
if(prob(70))
src<<"[M] takes [damage] damage!"
M<<"You take [damage] damage!"
M.hp -= damage
if(M.hp <= 0)
del M

else
src<<"You tried to slay [M]!"
M<<"[src] Tried to slay you!"
sleep(5)
src.attacking = 0
Equip()
set src in usr
if(usr.armoron==0)
usr.armoron++
usr << "You equip [src.name]"
usr.overlays+=src.icon
usr.defense+=src.power
src.suffix="Equipped"
else
usr << "You have something else on"
Unequip()
set src in usr
if(usr.armoron==1)
if(src.suffix=="Equipped")
usr.armoron--
usr << "You unequip [src.name]"
usr.overlays-=src.icon
usr.defense-=src.power
src.suffix=""
else
usr << "That armor isn't equipped!"
else
usr << "Nothing is equipped"


Problem description: I need to know how to, A) Make the weapon i am handling show with the charatcer holding it, for example if i wanted lets say Bob to hold a ironsword and him to hold it and keep it held while it is in his inventory and equipted, i would like to see it in his hands walking around, then when he attacks to stay in his hands and to maybe swing, and when it swings infront of it comes the slash already provided, Please help, /b>