ID:178954
 
Im wondering how i could make a bommer rang fly in a circle and come back to you
i know how to just make it go to the person but i dont know how to make it come back to you
so if you do thanx so much
Well, one way you could do it would just to have two missiles:

missile('boomerang.dmi',A,D) //A is attacker, D is defender
spawn(get_dist(A,D)) //time it takes for boomerang to reach target
missile('boomerange.dmi',D,A) //send it back

This won't go in a circle though. You could probably make it look more like a circle by having it go to a location not directly on it's path to the target like this:
B
A D
B
A = attacker D = defender B = locs to have the Boomerang go to on it's round trip from A to B from B to D from D to the other B then that B to A.
The boomerang in Darke Dungeon works as any of my other directional projectiles (http://shadowdarke.byond.com/snippets/projectile.zip has a brief demo.) but at each step, the boomerang turns 45 degrees. When the boomerang hits a mob, it tests to see if that mob is the person who threw it and if so they may catch it (if they have a free hand).
 ..   @ mob throwing the boomerang
.  .  . boomerang path
.  .
 .@
In response to Shadowdarke
Do you use a switch statement for that like this:

switch(dir)
if(NORTH)
step(src,NORTHEAST)

and so on.

Or is there some built in proc that I'm unaware of that does something like this for you?
In response to English
I assume he uses turn() :o)
In response to Foomer
Foomer wrote:
I assume he uses turn() :o)

Yep! Each step in the missile loop, I use:
    dir = turn(dir, angle)

where angle is either 45 or -45, depending on which hand you throw the boomerang with.