I'm trying to get a pair of guns to fire at the same time. Problem is, even though I have it mostly set up, I can't figure out how to keep it from fussing about an instance already being a child of 'root'.
const attack = preload("res://Game Scenes/playershot.tscn")
var playerAttack = attack.instance()
var shot_pos_1 = $GunOne.global_position
var shot_pos_2 = $GunTwo.global_position
# The actual shooting section \/ Needs a little help.
Whenever I try to get the projectiles to spawn, the Debugger says:
E 0:00:03.501 addchild: Can't add child 'PlayerShot' to 'root', already has a parent 'root'.
<C++ Error> Condition "pchild->data.parent" is true.
<C++ Source> scene/main/node.cpp:1176 @ add_child()
player.gd:45 @ shoot()
player.gd:16 @ _input()