Im trying to check if 1 float is lower then another float.
In my EnemyDistance float I keep track of the distance of my enemy towards my player which updates every tick. Now I also have an EnemyDistanceShouldAttack float which is set from an blueprint float which I set using an service but now I want to check if EnemyDistanceShouldAttack < EnemyDistance cause then I want to let him attack. But as far as I know I can only hardcode an value in an blackboard decorater.
You can do this check by using the Decorators in the tree. You would have to create variables in your Blackboard Data which will hold your current distance to be updated by your Service when your in an attack state, and have the Decorator check it against the desired distance before attacking. Sample below.
The other option is to create a Behavior Tree Decorator which does this internally with the character. You said hard coded, so I assume you already understand that way can be done as well?
Do you know how I can check instead of equal what I have now(which never happens since there is always 300.09123) that the enemyDistance float is lower then EnemyDistanceShouldAttack?
Since I set the EnemyDistanceShouldAttack in my AI blueprint so I wont have to hardcode it instead in my behaviourTree
This might not be entirely practical but let me know how it works for you haha! I felt a little goofy making it, but it totally works! Its a Decorator that compares multiple types with multiple operators! For variables that some operations do not apply to such as String or Objects, it will return false.
How can I create that decorater myself… when I add the “Add Decorater-> CompareBBEntries” I have no “Error tolerance option” which you do seem to have… because of this it almost never is equal…