All Questions

Community

Endar

setget error

# Spawns copies of FadingSprites per second
extends sprite

const FadingSprite: PackedScene = preload("res://GhostTrail/FadingSprite.tscn")

# The number of ghosts instanced per second
export var amount := 10.0 This is different in downloaded file
# If `true`, creates `amount` instances of FadingSprite every second
export var is_emitting := false setget set_is_emitting Comes up as error

  • Nathan Lovato replied

    You need to continue the tutorial. As you can read from the error, it tells you that the setter function is not defined. We define it a couple of steps later on the page to avoid jumping back and forth between different places in the script.

    Then, regarding the amount value being different, as mentioned in the comment above the variable, this just controls the number of ghost instances per second, so you can set it to any value you like.