Hi folx,
my background: Fairly new to Godot, seasoned in programming.
Scene names are in bold for clarification
As a mechanic in the top-down spaceship game (control scheme based off Mine Storm and such), I want the ship to emit particles.
I watched some tutorials and dug through the docs and here is the approach I figured out:
- Make a GPUParticles2D node (ShipParticles) as a child to the CharacterBody2D (player) node, which has the movement script
- Link the **ShipParticles **ready() signal to the script with the receiver method as emitting
- This code:
func emitting() -> void:
var particles = get_node("ShipParticles")
if particles != null:
if Input.is_action_pressed("ui_up"):
particles.emitting(true)
else:
particles.emitting(false)
I get this error:
emit_signalp: Error calling from signal 'ready' to callable: 'CharacterBody2D(ship.gd)::emitting': Method expected 0 arguments, but called with 1.
From my level of understanding I don't see why this error should show up. I linked the correct scene to the correct script with the correct name. Where is my mistake?