Page MenuHomeFeedback Tracker

AnimStateChanged event handler doesn't trigger when using setVelocity
Assigned, NormalPublic

Description

For some reason, the AnimStateChanged event handler doesn't trigger when the unit's velocity changes using setVelocity. However, the AnimChanged and AnimDone event handlers work fine.

There should be no link between animation and velocity.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce
  1. Run this code in debug console:
player addEventHandler ["AnimStateChanged", {hint str _this}];
  1. Move around. Notice that the event handler works.
  2. Now run this code:
onEachFrame {player setVelocity [0,0,-5]};
  1. Move around. Event handler doesn't work anymore.

You can try "animDone" and "animChanged" event handlers in step 1. But they work fine regardless of the velocity.

Event Timeline

Leopard20 renamed this task from AnimStateChanged event handler doesn't trigger when combined with setVelocity to AnimStateChanged event handler doesn't trigger when using setVelocity.
Leopard20 updated the task description. (Show Details)Aug 22 2020, 3:38 PM
BIS_fnc_KK changed the task status from New to Assigned.
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Nov 24 2020, 6:09 PM
BIS_fnc_KK added a subscriber: BIS_fnc_KK.