How do you fix this?
verb
arrows()
arrow(/obj/projectile/arrow,src)
proc
fireprojectile(Type, mob/Who)
/*
Type = the type of projectile
Who = who fired/threw the projectile
*/
var/obj/projectile/S = new Type(Who.loc) // make a new projectile where the mob is
if(!istype(S,/obj/projectile)) // make sure they are
world.log << "Invalid projectile:[Type]"
return
S.dir = Who.dir // projectile faces same dir as the mob
S.who = Who
S.missileloop()
obj
projectile
density = 1
layer = FLY_LAYER
var
mob/who // the mob that fires the projectile
damage = 0 // how much damage the projectile causes
mrange = 10 // how far the projectile can go
delay = 1 // number of ticks between movements
proc
missileloop()
step(src,dir) // T = space the
if(--mrange > 0) // decriment range
spawn(delay) missileloop()
else
endmissile()
endmissile()
/* This proc is called when the missile stops moving.
Override it for missiles that have special effects
like explosions or leaving items where they land.
*/
del(src)
Bump(O)
if(ismob(O))
world << "[who]'s [name] hit [O] for [damage] damage!"
//do your damage routine here
endmissile() // we hit something, so the missile stops
shield
icon = 'shield.dmi'
arrow
icon = 'arrow.dmi'
ID:149149
Jun 27 2002, 4:40 am
|
|
It's hard to be certain, since you didn't report what trouble you were having. It looks like you didn't define the arrow() proc. It looks like you want to call fireprojectile() where you used arrow().
verb arrows() <font color=#ffffa0>fireprojectile</font>(/obj/ projectile/arrow,src) |
Lummox JR