ID:163424
 
Here's the current code, currently it requires MOBs on the screen to perform a technique, I would like it to where it goes Straight ahead instead of it Being Homing and requiring a Mob to be on-screen.


var/obj/Kuro/O = new /obj/Kuro(usr.loc)
walk_to(O,M.loc)
Look up walk()
In response to GhostAnime
walk() is pretty useful. But what would you suggest doing if you wanted your projectiles to have a limited range? Right now I'm using a for(1 to whatever_range) loop with a step() and delay each iteration. Any suggestions for an alternate method?
In response to Zagreus
The for is probably the simplest, but you could always do something like this:

obj/projectile
var/range = 0

Move()
. = ..()
if(. && --range <= 0) del (src) // If the movement was successful, and (range - 1) <= 0, delete the projectile.


Then set the range on it and use walk().
In response to Destroy
Ahh, didn't think of doing it that way. Thanks for pointing it out.

No clue which one is the most efficient though.