Getting a blackboard value as int and then attempting to increment it does not actually increment the value. Upon attempting to increment a value that started at 0, the editor continued to print out 0 each time it ran through the increment node.
Found in 4.9.2 binary. Reproduced in 4.10.2 binary, 4.11 Preview 4, and Main CL 2855182
1. Open the editor
2. Create a new AI Controller blueprint
3. Create a new Blackboard
4. Add an integer key to the blackboard
5. Create a new Behavior Tree and link it to the blackboard
6. In the AI Controller BP, add a Run Behavior Tree node on Begin Play and set it to run your new BT
7. Pull off of the execution pin and add a Set Timer By Function Name node.
8. Add a new Custom Event, just call it Custom Event
9. In the Function Name of your Set Timer by Function Name, fill it in with Custom Event
10. Set the Time to 1, and set it to loop
11. Set up your custom event like the picture below
12. Compile
13. Create a new Pawn BP
14. Go into the Class Defaults, and set the AI Controller to the new Controller you created in step 2
15. Place an instance of the pawn in the level
16. PIE
Result: The value will always print out as 0 instead of incrementing.
Expected: The value would increment successfully.
Head over to the existing Questions & Answers thread and let us know what's up.
1 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.9.2, 4.10, 4.11, 4.12 |
Created | Feb 4, 2016 |
---|---|
Resolved | Jul 15, 2016 |
Updated | Jul 14, 2021 |