Ok, firstly, HAPPY EASTER, or at the least, SPRING!!! SO, i am totally a noob here. I'm not formally educated in this industry and i sincerely apologize for my lack of understanding. I have searched and read as much documentation as i can, but the answer seems to allude me still. I have been an active member of several forums (automotive, architectural, the "trades".... nothing software related) before and i do understand the search function, and the need to use it, however my issues skew all available documentation I've encountered (or potentially my ability to understand it). I am learning coding/game logic simultaneously, so any good pointers... besides "don't suck" or "get better"... ill gladly embrace.
My issue is creating a custom signal and passing the argument to another script. It all works the way i want it however when the object is instantiated it is going to the location in the file and not the updated/current location attached to my character2D node. when i print the name of the selected Marker2D it works identifying if i have one or the other selected, so i assume im accessing the correct information. I update the variable defined in the signal func to be the .position of my current marker and emit the signal with the position as the argument. In the 'main' script when the func runs i try to update the location of the node with the argument (id of Marker2D) however the image will load at the same location.
The markers are children of POINTS which is a child of player
PLAYER SCRIPT:
7) signal action1(location) #signal with added argument to broadcast/location not updating
17) if Input.is_action_just_pressed("action1") and ballone: #working running in physics process
var allmarks = $POINTS.get_children() #working
print(allmarks) #access node and get children points/ working
var marked = allmarks.pick_random() #random child picked/ working
action1.emit(marked.position) #emit signal with argument
ballone = false #reset bool
$action1.start() #timer
MAIN SCRIPT:
3) var ball = preload("res://scenes/ball.tscn") #working
19) func _on_player_action_1(location): #signal works, argument incorrect
var dropped = ball.instantiate() #working
add_child(dropped) #working
location = dropped.position #object spawned at scene location and not updated player position
I have done everything i can and looked up everything i could find. I changed location before adding child and that had no effect. If i update the dropped.position = $player.position it spawns inside the character. When i print the vector2 of the instantiated object it shows it spawning where it is in the editor, at the respective different locations. I am on a roll implementing what I've been learning but not being able to do this has created a huge roadblock moving forward for me. i erased the nodes and recreated and i am having the same effect. I watched a tutorial and believe i did it step for step... but i am having the same issue. One caveat hear is that i am using a potato... if that matters... i am running godot in compatibility mode... but i don't see where either of those should effect the situation. My potato is from 2011 (about as strong as an xbox360) but have telemetry for windows 11 adjusted and am currently up to date with that... so MAYBE, that could be some issue here, but again, i don't personally seeing that issue effecting GODOT running properly.