obj
Bullet
C45B
icon='Gun.dmi'
icon_state = "C45B"
density = 1
Bump(mob/M)
if(istype(M,/mob))//if it is a mob
var/damage
damage = (M.Health - usr.Armor + rand(2,-2))
if(damage >= 1)
M.Health -= damage
M.Death()
del(src)
else
del(src)
else if(istype(M,/obj))
del(src)
return
else if(istype(M,/turf))
del(src)
return
mob
proc
Death()
if(src.Health <= 0)
src.Health = src.MaxHealth
src.loc = locate(1,1,1)
<dm/>
ID:162472
Jan 4 2008, 12:18 pm
|
|
I need to make this projectile move to the location i click how would i do that??
|
In response to Loser Mongoose
|
|
For a "noob" you are actually right. You would use the Click() proc in conjunction with step_towards() or step_to() to make it go to the place you clicked(look the procs up in the reference.)
|
In response to Kakashi24142
|
|
i would use walk_towards()
|
In response to Nidaime Hokage
|
|
Oh yea, my bad. The walk() procedures would be better for this.
|
Give this a shot:
obj |
In response to Mendon
|
|
Awh, thats almost correct.
b.walk_towards(loc) thats wrong, bad arguments. The correct way is walk_towards(b,loc) PS you don't need Click(var/loc) you can leave it as just Click(loc).Also loc is already a var so i wouldn't recommend using it as an argument. newloc or something along those lines. ~Tubby~ |
I'm just saying that it might be useful.
*note*This is just a random noob at coding and forums so I have no idea on what would make it easier to understand.