I have a doubt about behavior tree instantiation. Eg.: When a player causes damage to another player it sends an event called DAMAGE<float> the target checks the event, while the target’s behavior tree is running (lets suppose it takes a lot of time to process the damage) another player causes damage to the same target, how BT will behave? Do it shares the blackboard variable instances for every event checked? Will the first damage info be replaced by the second damage?
Hello and I am sorry for the late reply.
Like you expected, yes. The first event info (variable) will be overwritten whenever a new event is send with the new info. That is because the Check Event condition, writes the event info to the selected blackboard variable as soon as the event is received (same frame).
So, the best practice here, would be to instantly use the written variable (eg subtract the damage value from health) before doing any other lengthy actions, like for example playing animations.
Let me know if you have any other questions, or need further clarification on the above.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.