I have a problem creating a Object for my Player Skills. I have a external Script which has a Object for creating new Skills
var name: String
var baseDemage: float
func _init(name: String, baseDemage: float):
name = name
baseDemage = baseDemage
and I'm creating a new Skill called Fireball with Base Demage 10.5
var Skills = preload("res://Scripts/Skills.gd")
const Fireball = Skills.createSkill.new("Fireball", 10.5)
But if I print out Fireball.name or Fireball.baseDemage i can't see it
print("Name - " + Fireball.name)
print("Demage - " + String(Fireball.baseDemage))
Demage - 0
What I'm missing?
Thank you in advance!!