Godot Version
4.3
Question
why i keep getting error out of bound? ( animationplayer )
so i have 2 type animation idle and move
and i use animationtree
but if i only use walk animation without using any idle animation, i wont get any error.
Example ,
if i remove this code in my walk state i wont get error
func _Enter_state():
anim_tree.get("parameters/playback").travel("walk"))
**i keep getting this error, if i set frame more than 5, if put 6 or 7 i will get error **
this idle animation
this walk animation
E 0:00:20:0247 set_frame: Index p_frame = 6 is out of bounds (vframes * hframes = 6).
<C++ Source> scene/2d/sprite_2d.cpp:254 @ set_frame()
this my walk state
func _Enter_state():
anim_tree.get("parameters/playback").travel("walk")
func _Physics_state_Update( _delta : float ):
anim_tree.set("parameters/walk/BlendSpace2D/blend_position", input_ND.facing_dir)
Entity_node.velocity = Entity_node.velocity.move_toward(input_ND.move_dir * Entity_node.move_speed , Entity_node.acceleration)
if input_ND.move_dir == Vector2.ZERO:
Change_State_Signal.emit( act_state_id, EnMgr.act_state.idle)
this idle state
func _Enter_state():
anim_tree.set("parameters/idle/blend_position", input_ND.facing_dir)
anim_tree.get("parameters/playback").travel("idle")
func _Physics_state_Update( _delta : float ):
Entity_node.velocity = Entity_node.velocity.move_toward( Vector2.ZERO , Entity_node.friction)
if input_ND.move_dir != Vector2.ZERO:
Change_State_Signal.emit( act_state_id , EnMgr.act_state.walk )
already delete animation player and animation tree, then do all again and still get the same error.
this my duplicate project file with same error, when you move the player to up left or up right then stop , you will get error,
if you didt get error, try repeatly pust button ( S and Q ) or ( S and E )