sleep(rand(Speed1,Speed2))
step_towards(src,src.target)
sleep(rand(Speed1,Speed2))
step_towards(src,src.target)
sleep(rand(Speed1,Speed2))
step_towards(src,src.target)
sleep(rand(Speed1,Speed2))
step_towards(src,src.target)
In a AI code? am juss wondering.
On the other hand, if you wish to continue the behavior indefinately as long as <code>src.target</code> is true, you should do something like this:
Also, note that <code>src.target</code> is unnessesary unless you have a temporary variable named "target".
You may want to ditch the <code>src.</code> if it's not such a temporary variable. It saves on typing, and we all know programmers are lazy.