Page MenuHomeFeedback Tracker

AI unable to aim when using playMove/playMoveNow
New, NormalPublic

Description

As the title says, the AI won't aim their weapon or change their head direction during the first loop of a playMove/playAction/etc.
This bug affects both head and weapon aiming.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
AI Aiming / Shooting
Steps To Reproduce

Simply give an AI a playMove in a loop. E.g:

Place an AI in editor. Set his var name to "AI". Also, place an enemy unit in front of him. Name him "aiTarget".

Run this sample code in debug console:

[] spawn {
  _lastDir = 0;
  aiTarget disableAI "ALL";
  ai setSkill 1;
  ai disableAI "MOVE";
  ai doWatch aiTarget;
  ai doTarget aiTarget;
  aiTarget allowDamage false;
  _time = time+3;
  waitUntil {
    ai playMoveNow (["amovpercmtacsraswrfldl", "amovpercmtacsraswrfldr"] select _lastDir);
	ai forceWeaponFire [currentWeapon ai, currentWeaponMode ai];
	ai reveal aiTarget;
	if (time - _time > 3) then {
		_time = time;
		aiTarget attachTo [ai, [0, 5, ([2, 5] select _lastDir)]];
	};
	_lastDir = 1 - _lastDir;
	ai setAmmo [currentWeapon ai, 10];
   sleep 0.3;
    false
  }
};

This will make the AI constantly shoot at the target while playing an animation in a loop.

The problem is, the AI cannot aim up or down even though the target is right in front of him.

Event Timeline

Leopard20 created this task.Sep 7 2019, 4:03 PM
Leopard20 edited Steps To Reproduce. (Show Details)
Leopard20 edited Steps To Reproduce. (Show Details)Sep 7 2019, 4:05 PM
Leopard20 updated the task description. (Show Details)Sep 24 2020, 9:22 PM
Leopard20 changed Category from Anims to General.
Leopard20 updated the task description. (Show Details)Sep 24 2020, 11:16 PM
Leopard20 changed Severity from Feature to Minor.
Leopard20 changed Operating System from Windows 8 x64 to Windows 7.
Leopard20 changed Category from General to AI Aiming / Shooting.
h- added a subscriber: h-.Sep 25 2020, 7:03 AM