Closed Granshmeyr closed 11 months ago
This would seem to be an initialization problem. When the guard is evaluated, the lastMovement
property is not set to anything, so the expression cannot find it and you get this error message. You can fix this by initializing this property maybe in the _Ready
function of your player, so it is ensured that the property has some value whenever the guard is evaluated:
public override void _Ready()
{
stateChart.Call("set_expression_property", "lastMovement", "none");
}
For some reason I get the following errors when using an ExpressionGuard:
Regardless, the statechart still functions as expected. There is just a little bloat in the Debugger. This is how I'm calling
set_expression_property
in my C# script:My node tree looks like this:
ToIdleUp properties:
![image](https://github.com/derkork/godot-statecharts/assets/80663569/e8db9f6e-4db4-4ed4-8e9e-9064eff11dc6)