How to make minigame assets work seprately?

Godot Version

4.6

Question

Hello!!

Ive been trying to make a juggling minigame. When only one ring is in there, the minigame works perfectly, but as soon as the other ring comes in, it stops working independently. I have it set up so that you need to press an arrow key at a specific time, but whenever you need to for the other ring, instead of printing what it needs, it teleports the first ring to the arrow the other one is at as though that ring was the one that was there. Ive tried checking for which body is entering, as well as if a certain body is in a certain group, but no luck. How would i get them to work independently?

func _process(float): #for the area I want the rings o collide and interact with, and when i want the player to tap the key
	if redarrow.visible:
		if Input.is_action_just_pressed("right_arrow"):
			#for blue ring only
			if bluering: #here, i also tried is_in_group("bluering") but no luck.
				print("Ring Touched")
				animationplayer.pause()
				animationplayer.play("up_right")
				animationplayer.queue("down_left")
				set_score(left.score +1)
			else:
				print("redring")
1 Like

It’s a little hard to visualize how the minigame is supposed to work - could you take a screenshot for instance? With the scene hierarchy in view and any errors.

I’m unsure, but it sounds like your rings might be reading / writing to the same variables, hence why one jumps to the other. Maybe an object rather than the instances of it?