I have this beautiful script that is a resource that allows me to make mulitple units, in the script/resource I have it calculate the stats of the units damage, health etc, but I have the base stats set up as export values so i add them in the editor, but for what ever reason the script its self ignores the export values and thinks them as zeros but I know that some export values work because when i print say the base_hp it prints it correctly but when i try to print just hp its just 5, (it seems the added 5 at the end works, makes sense to me at least) but the ints dont remember unless I make it a function that calls them to return it correctly.
Here is the script, am I making a mistake somewhere this is the second time I actually tried using a resource but this can be annoying.
extends Resource
class_name Monster
export(Texture) var front_sprite
export(Texture) var back_sprite
export(String) var name
export(int) var level
# Gets the types and gives the monster a type
export(TypeData.types) var type_1 = TypeData.types.none
export(TypeData.types) var type_2 = TypeData.types.none
# Base stats the limit the amount of points a monster can get
export(int) var Base_hp
export(int) var Base_attack
export(int) var Base_special_attack
export(int) var Base_defence
export(int) var Base_special_defence
export(int) var Base_speed
# The avaliable moves the monster can use to attack or other actions
export(Array,Resource) var move_slot = [null,null,null,null]
# The monsters stats based on the level
var hp = ((float(Base_hp * level) / 100.0) + 5.0)
var attack = ((float(Base_attack * level) / 100.0) + 5.0)
var special_attack = ((float(Base_special_attack * level) / 100.0) + 5.0)
var defence = ((float(Base_defence * level) / 100.0) + 5.0)
var special_defence = ((float(Base_special_defence * level) / 100.0) + 5.0)
var speed = ((float(Base_speed * level) / 100.0) + 5.0)
# So when the monster takes damage we can takeaway the hp
var current_hp = hp