ID:172759
 
Hello I have came across a problem, I dont quite know what proc/s I should use for this...I want my "AI" units to move to a specific area if the game has a certain game mode, I have tryied this;
                    if(gamemode=="Storm The Grave")
for(var/area/Stormthegrave/L in world)
spawn() walk_to(src,L,0,3)
break
else
spawn() step_rand(src)


And this;

                    if(gamemode=="Storm The Grave")
var/area/Stormthegrave/L = locate() in range(src)
if(L)
spawn walk_to(src,L,0,3)
else spawn step_rand(src)
else
spawn step_rand(src)

Neither work, but im geussing its because of the fact of this in the reference (for walk_to) "If Ref is within Min steps of Trg, no action will be taken. This is also true if the target is too far away" or at least from what I understand from that. Thanks for any help.
If you want better pathfinding, check out hub://Deadron/Pathfinding
In response to Crispy (#1)
Crispy wrote:
If you want better pathfinding, check out hub://Deadron/Pathfinding

Thank you Crispy, using that it works :-)...sweet stuff, thanks again.