Jump to content
Sign in to follow this  
McArcher

Problems with doMove

Recommended Posts

Some AIs don't react to doMove commands (they just turn their head to the direction and then don't move there), and some AIs get stuck on their way (just stop for example at half of the distance to target and don't move any more). I'm using only doMove, no other commands. Don't even check if they are ready with unitReady. Why is this happening and how to make them move??

Share this post


Link to post
Share on other sites

I thought "move" was for groups and "domove" for individual units :confused: Maybe it changed with ArmA2....

Share this post


Link to post
Share on other sites
I thought "move" was for groups and "domove" for individual units :confused: Maybe it changed with ArmA2....

For individual units, use moveTo.

It looks, to me, like "move" creates a group waypoint, while "moveTo" affects an individual. If that individual happens to be a group leader, he'll drag everyone else along with him :)

Share this post


Link to post
Share on other sites

i have changed

_x doMove _newPos;

to

(group _x) move _newPos;

but part of them still doesn't want to move. Those who moved they now don't stop. At least one plus.

Share this post


Link to post
Share on other sites

it's strange.. with

_x moveTo _newPos;

they don't move at all...

but with move .rpt had some strange errors (not in code, errors from engine)

---------- Post added at 22:52 ---------- Previous post was at 22:36 ----------

sometimes without errors..., but not all of them move with move.

---------- Post added at 23:16 ---------- Previous post was at 22:52 ----------

now move works everytime without errors... hm...but they sometimes don't move :(

---------- Post added at 23:22 ---------- Previous post was at 23:16 ----------

wow, now it works..

the reason was: several units came to exactly the same position and from this positon not all units were able to receive move commands.

i modified a script so that units came to random position close to position needed (used random radius and angle and used sin/cos to make random circle around my pos. now that works!!! )

Share this post


Link to post
Share on other sites

Domove doesnt work well in 1.05. Moveto and commandmove dont either. They will work predictably unless enemy is detected and then not so much.

A waypoint for the whole group seems to work. If the group has detected enemy it seems that domove and those other commands are over taken by the BIS AI behaviour regime. BIS has made no claims that there is even a problem here. Except waypoint, or perhaps move if it uses the same part of the program "logic" as waypoint tool does, havn't tested that.

More testing is needed but I posted about this last month and I believe an entry was made on the bug tracker. I hope it gets cleaned up in the future.

Edited by TJ72
Spelling

Share this post


Link to post
Share on other sites

btw, I tested , and even move one time didn't work - most of soldiers got out the building but 2 of 40 got stuck there... and further move commands to differecnt locations don't move them.... also a bug?

---------- Post added at 02:05 ---------- Previous post was at 02:03 ----------

in that place, I myself could couldnt come through, but i went another way, but AI don't look for another way i think.... at least not 100% time they look for alternative path..... a bit buggy...

Share this post


Link to post
Share on other sites

That might be the problem: Several AI entities inside a building and all run out at the same time. They are too stupid for that and either go through walls are get stuck inside because one unit is blocking the door while the next wants to go through that door too.

In this case I would make a small script which adds a little delay between the move/doMove/moveTo orders so they don't run out at the same time.

Edited by W0lle

Share this post


Link to post
Share on other sites

Waypoint method should punch through the issue. They may pause but should allways get going.

Other time AI may get hung up on edges of things. Ive seen AI run endlessly with their forehead stuck on a tanks barrel. Sometimes they simply fail to "path".

It would be possible to script a stuck-detection method and use small increment of randomized setpos to break a stuck unit out.

Best test is to run your code with enemy AI present and without. Then check for difference in outcome for the same script. Likely you will find a need for a different state in the case of SAFE or COMBAT conditions because this seems the root of the issue. When the units are in COMBAT they cannot be switched out of it in 1.05. It really sucks.

My method is to try the domove way and if that fails try playmove but that even has issues with collision and AI moving in place and then force them beyond that somehow, either with a horrific looking setpos and setdir loop or the waypoint method. That is three layers of failure checks for simple AI movement that is reliable whether enemy is around or not.

Share this post


Link to post
Share on other sites
I thought "move" was for groups and "domove" for individual units :confused: Maybe it changed with ArmA2....

u are right, if u use move on a soldier will move lieader of soldier I use way points for groups and domove for individual soldiers and runs ok.

Edited by Monsada

Share this post


Link to post
Share on other sites
Waypoint method should punch through the issue. They may pause but should allways get going.

So, if I understand correctly, as move command uses waypoints, this method is preferred? I was testing my script, everything seemed to be ok (I modified orders, positons were not exact, added random element in order not to get stuck), but at one moment saw what you told about: enemy suddenly appeared near my AIs, and they forgot everything and ran to help each other (searched enemy) and didn't follow any of move instructons for several minutes. I don't know if they would reteurn to normal behaviour because I quit the mission.

Share this post


Link to post
Share on other sites

I havent tested Move command as same effective result as editor placed waypoint so it may work differently internally and have different results. Using script commands to add waypoint to group and deleting waypoint on arrival (with a leader distance check loop) seems the current best practice for me.

Scripted waypoint creation should have same result as editor placed waypoints.

The units should return to normal behaviour after threat is cleared from its awareness or if it has a current waypoint. The AI can take the domove and commandmove/moveto commands again once clear of enemy in its own awareness. I havent tested if waypoint behavior setting will override the new behavior of sticking in Combat mode. If I have time I may try to assign a waypoint in a script that changes behaviour from Combat to another mode and see if it sticks if enemy is around.

Edited by TJ72

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×