Is there a way to access a script var, in another scene using a func ?
i keep getting an error
Invalid access to property or key ‘prevState’ on a base object of type ‘Node2D (plrIdle.gd)’.
@export_subgroup("Handle Node")
@export var handleNode: Node2D
func _changeState( prevState, _stateName ):
print(handleNode.prevState)
prevState is used has state in the other script:
func move( idleState ):
skel._changeState( state, stRun );
If i do this ( handleNode.state ) everything works fine: print is Zero
@export_subgroup("Handle Node")
@export var handleNode: Node2D
func _changeState( prevState, _stateName ):
print(handleNode.state)
Parent node is “characterBody2D”… the script is in node2D, so using class is always useless…