How can i get this code to send EXP to the usr that throws the Shuriken??
obj/Items
Shuriken
icon = 'OBJ.dmi'
icon_state = "Shuriken"
DblClick()
usr.ThrowShuriken()
obj/Weapon
Shuriken
icon = 'GFX.dmi'
icon_state = "Shuriken"
density = 1 //this have to be set to 1 so the bullet can hit people
Bump(mob/M)
if(istype(M,/mob/)) // Make sure what is hit is a mob
M.Chakra -= ATK //Minus one point of health if hit.
if(M.Chakra<=0)//Check if the player's health is eual to or less than 0
M.loc=locate(50,2,1)// Move the mob to the starting position
del(src)// this will delete the bullet when it hits something
mob/proc
ThrowShuriken()
var/obj/Weapon/Shuriken/O = new /obj/Weapon/Shuriken(usr.loc)
O.Owner = usr
O.ATK = usr.AGI
walk(O,usr.dir)//need to add speed
sleep(15)
del(O)
ID:147285
Jul 11 2004, 2:29 pm
|
|
rename caster.'getexp'(caster) to your exp proc
and add 'var/mob/player' in the exp proc
demo
yourexpproc() // how u got it
yourexpproc(var/mob/player)
notes
in the EXP proc the player you want to gain exp is called 'player' not 'src'.