Godot Version
4.1.1
Question
What’s this green thing here?
And how do add it to my function?
To backtrack (this is all a bit backwards, so please bear with me).
I was working on a Godot game a year ago. Got frustrated and now am back having a look at it although things are now a bit rusty…
I’ve got a function that emits firey pixels of death (bullet) from the player sprite. All is good!
In order to add a second weapon, I’ve duplicated the weapon script and weapon scene. It registers the key press, but does not emit the bullet. Frustrating.
The only difference is I’ve noticed in the main .gd script there is an green left arrow with a right angled bracket (see above) that is missing from the second script.
func _on_player_weapon_a_shot(weapon_a_scn, location):
# Weapon A
var wpn_a = weapon_a_scn.instantiate()
wpn_a.global_position = location
weapon_container.add_child(wpn_a)
#play sound effect
weapon_a_sound.play()
Text version of code
How do I add the signal??/connections ?? to the function?