Problem statement
I'm trying to follow Single Source of Truth architecture and I'd like to set up multiple parameters for LimboAI BT using a blackboard. My game has multiple NPCs with a parameter named "attack_cooldown", and with built-in BTWait I have to explicitly write the duration in editor. There are two problems with this:
- The same value has to be setted up twice: in the agent node and the BT timer
- It's complicated to change the value during runtime (like applying buffs and debuffs)
Proposed solution
It would be reasonable if built-in features like BTWait or BTCooldown could grab their duration var from blackboard
Alternatives
Currently I'm solving it with creating my own Timer-based actions, but for me it seems such a base feature that it deserves to be in the box:
class_name WaitWithVar
extends BTWait
@export var duration_var: StringName = &"duration"
func _setup() -> void:
self.duration = self.blackboard.get_var(duration_var)
Problem statement
I'm trying to follow Single Source of Truth architecture and I'd like to set up multiple parameters for LimboAI BT using a blackboard. My game has multiple NPCs with a parameter named "attack_cooldown", and with built-in BTWait I have to explicitly write the duration in editor. There are two problems with this:
Proposed solution
It would be reasonable if built-in features like BTWait or BTCooldown could grab their duration var from blackboard
Alternatives
Currently I'm solving it with creating my own Timer-based actions, but for me it seems such a base feature that it deserves to be in the box: