gd-YAFSM
gd-YAFSM copied to clipboard
Reference variables directly from the parent of StateMachine
Hi, I'd be happy if we could reference variables directly from the parent, instead of setting the variable separately, we could have the current option as well, when we have to reference from children of the parent.
I hope you understand it, and I know the difficulty of the implementation, but it would be a nice feature to have.
Do you mean like what you can do with AnimationTree:
anim_tree.set("parameters/eye_blend/blend_amount", 1.0)
# Simpler alternative form:
anim_tree["parameters/eye_blend/blend_amount"] = 1.0
No not like that, well, directly referencing the variable, like getting the variable directly instead of setting the variable.
$StateMachinePlayer.set_param("speed", speed)
instead of this, the variable could be directly fetched from the parent, so instead of setting the variable here, the state machine will fetch the variable directly and we could reference the variable in the editor.
https://i.imgur.com/MzIvmoJ.png Here, it will a menu option, where you could select the variable.
A menu that popup when typing variable name, so you can choose from the list?
Can do that, but I am leaving all the UI/UX improvement for v1.0 update, so it gonna take some time.