godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.7k stars 20.12k forks source link

Animation does not play after set input name of Transition in AnimationTree #94607

Closed kyushu closed 3 weeks ago

kyushu commented 1 month ago

Tested versions

Godot v4.3.beta3.gdscript

System information

Window11 - Godot v4.3 beta3 Vulkan 1.3.280 - Forward+ NVIDIA GeForce RTX 4090 Laptop GPU

Issue description

when i play attack1,2,3 animations according to the following animation tree and code, the animation will be played several times then it stops playing the animation.

螢幕擷取畫面 2024-07-22 123542

_anim_tree.set("parameters/attack_trans/transition_request", attack_enable_name)
_anim_tree.set("parameters/attack_shot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)

i have set animation call method to notify the animation is finished, when animation is finished, i run the above code to play one of attack1, 2, 3 animations again. but it will stop playing animation after i have run this loop several times.

here is my log, i print which name i set to transition_request and "attack_animation_end" will be printed when animation is finished

attack_enable_name: attack2
attack_animation_end

attack_enable_name: attack3
attack_animation_end

attack_enable_name: attack1
attack_animation_end

attack_enable_name: attack3 <--- do not play animation

Steps to reproduce

  1. create animation tree like i post
  2. add animation call method to notify animation is finished
  3. when animation is finished, you can set input of Transition to choose animation and trigger one shot to player the animation
  4. after random times, trigger one shot to player animation will fail.

Minimal reproduction project (MRP)

N/A

AThousandShips commented 1 month ago

Please upload an MRP to make this easier to test:

AThousandShips commented 3 weeks ago

Closing due to lack of response, if you provide the requested information this can be reopened