Summary
play_animation_controller.Play(animation_sequence) is broken after the 32.00 update.
I have retargeted animations that were playing just fine prior to the update. They are still playing fine in the animation preset blueprint.
However if you try to get the NPC’s fort_character and play_animation_controller and play an animation it defaults to play_animation_state.Error.
I have tried different Retargeted Anims from diff sources as well as different anim_presets.
Here is the snippet for testing
using { /Fortnite.com/AI }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }
using { /Verse.org/Assets }
using { /Fortnite.com/Animation/PlayAnimation }
using { /Verse.org/Colors }
(PAS:play_animation_state).ToString()<transacts>:string=
case(PAS):
play_animation_state.Error => "Error"
play_animation_state.Interrupted => "Interrupted"
play_animation_state.Stopped => "Stopped"
play_animation_state.Playing => "Playing"
play_animation_state.BlendingIn => "Blending In"
play_animation_state.BlendingOut => "Blending Out"
play_animation_state.Completed => "Completed"
npc_zombie_behavior_simple := class(npc_behavior):
@editable MaybeTestAnimations : ?[]?animation_sequence = false
GetFC()<transacts><decides>:fort_character=
Agent := GetAgent[]
FortChar := Agent.GetFortCharacter[]
return FortChar
OnBegin<override>()<suspends>:void=
for(i := -5..-1):
Sleep(1.0)
Print("Starting Anims In {Abs(i)}")
if:
FC := GetFC[]
AnimControler := FC.GetPlayAnimationController[]
MaybeAnims := MaybeTestAnimations?
then:
Print("Got Dependencies", ?Duration := 3.0, ?Color := color{G := 1.0})
for(i -> MAnim:MaybeAnims, Anim := MAnim?):
Print("Playing Anim {i} In 1 Second...", ?Duration := 1.0)
Sleep(1.0)
AnimInstance := AnimControler.Play(Anim)
var Time : float = 0.0
race:
block:
AnimInstance.Await()
Sleep(0.25)
block:
loop:
State := AnimInstance.GetState()
Sleep(0.01)
set Time += 0.01
if:
State = play_animation_state.Error or
State = play_animation_state.Interrupted or
State = play_animation_state.Stopped
then:
Print("Unexpected State for Anim {i} = {State.ToString()}", ?Duration := 5.0, ?Color := color{R := 1.0})
break
Print("Anim {i} Done In {Time}")
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
AI
Steps to Reproduce
Copy Code, Get A Few Anims that will work with a fort_character, make NPC Def / Anim Preset, Add NPC Device, Add @editable Anims, Start Game
Expected Result
play_animation_controller.Play() Plays Animation
Observed Result
play_animation_controller.Play().GetState() immediately returns play_animation_state.Error / Anim Doesn’t Play
Platform(s)
Windows