Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | vybr | |
Old Version | Published before Godot 3 was released. |
I seem to get the error “Index p_frame out of size (vframes * hframes)” whenever an enemy dies in my game (they are removed using queue_free). It’s somehow caused by calling set_frame in a 2d sprite object.
The weird thing is none of my enemies use a sprite2d object object, they all use AnimatedSprite2D. I commented out all “set_frame” calls in every script in my project yet I still get this error. I used a file searcher so I definitely didn’t miss anything.
There is also no stack trace for the error.
Is anyone else experiencing this issue?
I’m not used to AnimatedSprite but the error suggest that you are trying to access to a frame that does not exist, like if it have 5 frames and is trying to get the 6th.
Maybe the wrong frame was set on the inspector or the animation/spriteframe is broken.
Check the remote inspector while playing, add breakpoints to check frame values.
eons | 2017-04-26 21:42