Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
haleks

Issues with "doMove" commands

Recommended Posts

I wonder if anyone else experienced this, but most of the "moveTo", "doMove" commands don't work well.

I'm working on a script to have a unit follow another one closely (without being part of his group).

The ASL position (the wiki says it is the fastet getPos method) of the target is updated every 0.5 second, and the unit is ordered to move to that position with "doMove" (all this in a loop).

All works fine - for a few minutes. At some point the unit freezes, and just stands there without animations. But it still does try to move to the target : the unit always turns around to keep its target in sight. If the target get close to the unit (5 meters, maybe), it will eventually "unstuck" it, but the problem will occure again after some time. I've tried pretty much all variations of "doMove" & similar commands, "disableAI", combat modes & behaviour to no avail.

I'm starting to think about using waypoints, but I feel that it is a complicated work-around for what should be a simple task to a single unit.

:( Is there no way to have a unit follow you as fluidly as if it was in your group?

Any thoughts guys?:confused:

Share this post


Link to post
Share on other sites

I can't seem to reproduce the issue, unit follows me just fine.

Share this post


Link to post
Share on other sites

Have a look at these posts.

Chances are you're running into this exact problem.

While I've only verified this for ArmA2, I'm pretty sure this also applies to ArmA3, considering this went undetected for more than 2 years. In short: moveToFailed never gets triggered, which easily leads to units being stuck in all kind of situations.

Share this post


Link to post
Share on other sites

Yep, looks like the exact same issue - although I don't remember that happening in A2.

But the getting stuck/unstuck continuously is exactly the issue - for me it even happens on Stratis Airfield! I doesn't seem related to terrain configuration, as far as I can tell...

I wonder if the AI is not freezing while calculating a path to the constantly renewed positions?:confused:

One thing to mention, this behaviour doesn't occur with waypoints - so it might be a good work-around, but it's a tedious one.

Sadly that's not the only critical script command to be broken in A3. T_T

Share this post


Link to post
Share on other sites

Yes, it's been present since forever for every types of units & vehicles. Check for moved distance and if it's around 0, doStop, and issue doMove again.

Share this post


Link to post
Share on other sites

Thanks for the tip Zapat! I'll try that ASAP.

Edit : That seems to do the trick, thanks again man! ;)

Edited by Pepe Hal

Share this post


Link to post
Share on other sites
Sign in to follow this  

×