+1 vote

When I change the values in the inspector nothing happens.

Here is some of my code:

extends KinematicBody2D
export var speed = 100
export var walk_speed = 50
export var dash_speed = 500
export var tileSize = 32.0
export var max_speed = 500
onready var current_speed = speed
onready var lazer_beam = preload("res://scenes/LazerBeam.tscn")
onready var bullet = preload("res://scenes/Bullet.tscn")
var lazer = null

const stamina_loss_captain = 1

export var stamina_lost = {
        "Teleport": 180,
        "Attack": 70


export var stam =  {
        "Initial Max": 2000,
        "Current Max": 2000,
        "Regeneration": 100,

        "Current" : 2000


class energy :
    var initial_max = 0
    var current_max = 0
    var regeneration = 0
    var current = 0

    func _init(im = 200, cm = 200, regen = 40, cur = 0):
        initial_max = im
        current_max = cm
        regeneration = regen
        current = cur

    func regenerate(delta):
        current += regeneration * delta
        if(current >= current_max):
            current = current_max

    func left():
        if current > 0:
            return true
            return false
        return false
    func deplete(amount):
        current -= amount

    #If current does not go under zero after depletion return true else return false
    func test_deplete(amount):
        if(current - amount >= 0):
            return true
            return false

    func if_left_deplete(amount):
            return true
            return false

    func if_not_under_zero_when_depleted(amount):
        if(current - amount >= 0):
            return true
            return false

var stamina = energy.new(stam["Initial Max"], stam["Current Max"], stam["Regeneration"], stam["Current"])

So I later found out that if I change the original scenes dictionary values in the inspector and not the instanced scene of it or an inherited scene of it the values do change but not otherwise.

in Engine by (49 points)
edited by

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.