⚡Animation Events
Last updated
Last updated
To better synchronize character animations and game actions, use various animation events.
Add the PlayStepSound event with the float parameter Volume to movement animations for characters and enemies so that footstep sounds plays during the game.
To synchronize an animation and grenade throw add the LaunchGrenade event to a throw grenade animation.
To synchronize the sound of a melee attack (for characters and enemies) with animation add the PlayAttackSound event.
To synchronize an animation and shell spawn add the SpawnShell event to the shooting animation and disable the Spawn Shells Immediately toggle in the Weapon Controller script.
To synchronize the appearance and hide the weapon magazine with the reloading animation, indicate the magazine in the Weapon Controller script...
...and use the following events:
If you use animation in which a character takes weapons in different hands, the following events will come in handy:
Event
String Parameter
Meaning
ChangeMagazineVisibility
show
Show the default magazine
hide
Hide the default magazine
hideAndCreate
Hide the default magazine and create a copy of it
DropMagazine
-
Drop a magazine from the weapon
Event
String Parameter
Meaning
ChangeParent
left
Set the left hand as a parent for the weapons
right
Set the right hand as a parent for the weapons
rightAndPlace
Set the right hand as a parent for the weapons and place it in a default position.
If after animation weapon has the wrong position or rotation, this event we'll help you to fix that.