1000h func make_cursor():<br> menu_cursor_icon.load("res://HudTextures/MenuCursors/MenuCursorSheet.png")<br> #make the sprite<br> var cursor_sprite = Sprite.new()<br> cursor_sprite.set_texture(menu_cursor_icon)<br> cursor_sprite.set_hframes(4)<br> cursor_sprite.set_vframes(2)<br> self.add_child(cursor_sprite)<br> cursor_sprite.set_name('menu_cursor')<br> cursor_sprite.set_scale(Vector2(.2,.2))<br> cursor_sprite.set_pos(Vector2(512,512))<br> #make the animation player<br> var cursor_anim_player= AnimationPlayer.new()<br> cursor_sprite.add_child(cursor_anim_player)<br> #make the animation<br> var anim = Animation.new()<br> anim.set_length(1)<br> anim.set_step(.01)<br> anim.set_loop(true)<br> anim.add_track(0,0)<br> anim.value_track_set_update_mode(0,0)<br> cursor_sprite.set_hframes(6)<br> cursor_sprite.set_vframes(2)<br> var track = anim.track_set_path(0,"/root/Spatial/Control/menu_cursor:frame")<br> #void track_insert_key( int idx, float time, Variant key, float transition=1 )<br> anim.track_insert_key(0,0,0,1)<br> anim.track_insert_key(0,1,4,1)<br> #void track_set_key_value( int idx, int key, Variant value )<br> anim.track_set_key_value(0,0,1)<br> anim.track_set_key_value(0,1,10)<br> cursor_anim_player.add_animation('anim',anim)<br> cursor_anim_player.play('anim',1,1,false)
razvanc-r Man... @1000h, try to learn how to use code highlighting when posting, it will make all of our lives easier... Read this: https://godotdevelopers.org/forum/discussion/15825/please-read-how-to-use-categories-tags-hashtags-and-when-to-post-questions-or-discussions#latest under 'Posting', item number 3.
1000h Thanks for sharing that link, I was trying to find code tags I didn't realize they were within that little paragraph styling tab