Skip to content

Commit

Permalink
Merge pull request #83 from nickswebsite/fsm-integrated-bt-state-fix
Browse files Browse the repository at this point in the history
WIP: FSMStateIntegratedBT state fix
  • Loading branch information
ThePat02 authored Aug 27, 2024
2 parents aacb575 + 6b87d44 commit 38fa559
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func _on_enter(_actor: Node, _blackboard: Blackboard) -> void:

## Executes every process call, if the state is active.
func _on_update(_delta: float, _actor: Node, _blackboard: Blackboard) -> void:
behaviour_tree._process_code(_delta)
if behaviour_tree.current_status == on_status:
if fire_event_on_status:
get_parent().fire_event(event)
Expand All @@ -46,6 +47,13 @@ func _on_exit(_actor: Node, _blackboard: Blackboard) -> void:
behaviour_tree.active = false


func _ready():
super()

if behaviour_tree:
behaviour_tree.process_mode = Node.PROCESS_MODE_DISABLED


func _get_behaviour_tree() -> BTRoot:
# Don't run in editor
if Engine.is_editor_hint():
Expand Down

0 comments on commit 38fa559

Please sign in to comment.