First of all,
I have been loving advance_expression property in Animation and the potential of flexibility and the range of possibility to the usage of it. I’m thankful to those who proposed this idea and implemented it to the engine as a functionality. This makes it easy to handle more complex animation logic.
But this been bugging my mind for a while, is this just GDScript in disguise or another custom syntax processsor specifically implemented for this? If this is actually GDScript, I wonder how far I can push the boundary of this expression (ex. feedback triggers to the base node, state feedback of the animation).
Proof-of-concept code:
- On the base node
func trigger_something() → bool: print("Hey, the animation gone back to default!") return true
- On
advance_expressionfor transitioning to the target animationstate_1 == true && state_2 == true
- On
advance_expressionfor transitioning to default animationtrigger_something() == trueThis in a way, will create the possibility of triggers or giving feedback to the logic code (base node).
Is this in a way, just a code that gets parsed to the “if statement” of the animation state machine?