This still just feels so unhealthly

		"Thunderbolt":
			res.texture = load("res://assets/moves/thunderbolt.png")
			res.position = target.global_position
			res.scale = Vector2(2,2)
			res.vframes = 5
			res.frame = 0
			res.position.y += 16
			var ln2 = Sprite2D.new()
			res.add_sibling(ln2)
			ln2.texture = load("res://assets/moves/thunderbolt.png")
			ln2.position = res.position
			ln2.position.y -= 64
			ln2.scale = Vector2(2,2)
			ln2.vframes = 5
			ln2.frame = 0
			var ln3 = Sprite2D.new()
			res.add_sibling(ln3)
			ln3.texture = load("res://assets/moves/thunderbolt.png")
			ln3.position = ln2.position
			ln3.position.y -= 64
			ln3.scale = Vector2(2,2)
			ln3.vframes = 5
			ln3.frame = 0
			var ln4 = Sprite2D.new()
			res.add_sibling(ln4)
			ln4.texture = load("res://assets/moves/thunderbolt.png")
			ln4.position = ln3.position
			ln4.position.y -= 64
			ln4.scale = Vector2(2,2)
			ln4.vframes = 5
			ln4.frame = 0
			ln2.show()
			ln3.show()
			ln4.show()
			res.show()
			await get_tree().create_timer(.2).timeout
			res.frame = 1
			ln2.frame = 1
			ln3.frame = 1
			ln4.frame = 1
			await get_tree().create_timer(.2).timeout
			res.frame = 2
			ln2.frame = 2
			ln3.frame = 2
			ln4.frame = 2
			await get_tree().create_timer(.2).timeout
			res.frame = 3
			ln2.frame = 3
			ln3.frame = 3
			ln4.frame = 3
			await get_tree().create_timer(.2).timeout
			res.frame = 4
			ln2.frame = 4
			ln3.frame = 4
			ln4.frame = 4
			await get_tree().create_timer(.2).timeout
			res.hide()
			ln2.queue_free()
			ln3.queue_free()
			ln4.queue_free()
			res.scale = Vector2(1,1)
			res.vframes = 1
			res.frame = 0

no I cant use animation player because this heavily requires control nodes / position based movement and if I use Anim player that will get messed up on different screen sizes
so if y’all got anything that will work nicer than this mess I’m all ears lol

What if you tried having the animation parented to a node separate from the entities that can be moved around on its own, then the animation player should be usable because all the positions will be relative to the root of that node, then you just reposition that node then play the animation?

Edit: spelling

This is a top tier idea i didnt even think about it so like having a node2d that gets moved based on where i need the animation then making the animation player play off the node2d

Precisely, you can also have all the sprite nodes already made and attached, then just change their texture and or visibility based on your needs for the particular animation.

1 Like

Something else you might want to consider, is making each animation as it’s own scene, then you can set the textures on the sprite nodes to make it less work in the animation player. I don’t know how you attacks are stored, but if they were set up as custom Resources, you could export the PackedScene for the animation along with the other attack data. Just something else to consider, it’s how I do effect animations in my game.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.