Page MenuHomePhabricator

setunitpos "UP" causes units to get stuck in lowering/raising weapon loop (vanilla repro mission inside)
Closed, ResolvedPublic

Description

Infantry units are getting stuck in an animation loop where they raise and lower their weapons indefinitely. This is pretty simple to reproduce. Place some OPFOR and BLUFOR units down on a map, very close and facing each other, and put this in their init line:

this setbehaviour "safe"; this setunitpos "UP";

Press play and you can immediately see this bug in action.

Here is a vanilla repro mission: https://www.dropbox.com/s/jdrddjbyagxqhit/setUnitPos_repro.Stratis.zip?dl=0

Details

Severity
Major
Resolution
Fixed
Reproducibility
Always
Operating System
Windows 10
Operating System Version
1703
Category
AI Aiming / Shooting
Steps To Reproduce

See the steps above in the description.

Additional Information

N/A

Event Timeline

PiepMGI added a subscriber: PiepMGI.EditedMay 3 2017, 4:45 AM

+1
This is the main difficulty for scripting something consistent with Arma's engine.
Commands are not endless command. I mean. You are waiting for some evident result but many commands are struggling against the engine.
In a "perfect world", Arma's engine should work as is until a script runs a command acting on unit's behavior. At this time, this command should overrides the engines until another parameter or a cancel command.
The list of "disapppointing" commands is not exhaustive but consider:

selectweapon (you can "command" "order" a unit to take a launcher,.. if the engine decide it's better to shift on primary weapon, no joy for your script. There is no room for your intent and, in most of cases you'll not see the double shift.
Try to order to fire on building or even ground....

lights on/off for any car. The arma's engine will override your scripted choice with behaviors. So player can do stupid things like lights on when stealth, but not AIs.... (i don't mean by engine, but via scripted command).

SetUnitPos "any stance". That will not last. Even if this could be up to you to recover a "AUTO" (already existing!) position. Combat behavior is unit's master.

ceeeb added a subscriber: ceeeb.May 4 2017, 12:46 AM
shukari added a subscriber: shukari.May 5 2017, 2:49 PM

Really annoying for mission editors if you try to make defending units with disableAi "PATH" and setUnitPos "UP"... the missions is broken and unplayable after this init...

Undeceived added a comment.EditedMay 16 2017, 8:43 PM

This annoying and partially mission breaking bug isn't necessarily related to the "SAFE" behaviour (rather to "COMBAT") but definitely to the unitpos "UP" stance.

If the AI is at unitPos "UP" (either via script or by a group leader command) and then gets into "COMBAT" mode, the bug will happen.

EDIT:
Sorry, I didn't check it with 1.70. It seems fixed as far as I can see it.

razazel closed this task as Resolved.May 17 2017, 4:44 PM
razazel changed Resolution from Open to Fixed.