Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JakeCarbine |
hello I’m making a super pong game that has a power up that adds another ball to the game. The next ball should appear in the center of the screen.
extends Node2D
var collect = false
func _physics_process(delta):
$Area2D/AnimatedSprite.play("Spin")
func _on_Area2D_body_entered(body):
print(body.name)
if body.name=="Ball"&&collect==false:
collect = true
$Collection.play()
$AnimationPlayer.play("Fade")
$Area2D/AnimatedSprite.stop()
var ball = load("res://ball/Ball.tscn").instance()
ball.global_position = Vector2(0,0)
the orb plays the animation and sounds but the ball doesn’t load into the game.