You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question about class hierarchy with nested HSMs
#312
Obviously, this does not allow attaching CharacterGroundedState script to LimboHSM nodes and CharacterPatrolState script to BTState nodes:
WARNING: editor/scene_tree_dock.cpp:3636 - Script does not extend type: 'HSM'.
WARNING: editor/scene_tree_dock.cpp:3636 - Script does not extend type: 'BTState'.
The only option I see is to create three different base classes for each case:
class_name CharacterHSM
extends LimboHSM
class_name CharacterState
extends LimboState
class_name CharacterBTState
extends BTState
Are there any recommendations on how to organize the class hierarchy?
Should I just pass variables through a blackboard? What about methods?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I want to use the nested HMS feature, but I’m facing some problems.
My player's state machine looks like this:
My NPC's state machine looks something like this:
I want all my concrete states to share some variables, methods, and possibly type definition:
Obviously, this does not allow attaching CharacterGroundedState script to LimboHSM nodes and CharacterPatrolState script to BTState nodes:
WARNING: editor/scene_tree_dock.cpp:3636 - Script does not extend type: 'HSM'.
WARNING: editor/scene_tree_dock.cpp:3636 - Script does not extend type: 'BTState'.
The only option I see is to create three different base classes for each case:
All reactions