Might be a stupid question. In BP, if I always have a variable set to the correct value, should I set it each frame or check to see if it is what is should be and then set it to what it should be if it isnt?
This would work but is very inefficient, id recommend reading up on some c++ and their gameplay attribute system, with fairly minimal code you can set up a system to automatically call and event when the data changes, and from there you could reset it
If you go into the class BP on the function tab there is a little drop down box that says override, there maybe an event in there that works similarly but I’m not entirely sure
Depends on how often the variable changes and is it displayed.
If it can change every Tick() and is reflected on screen every Tick() then checking it every tick is appropriate. Say a health bar display.
True but still much more CPU friendly to setup an attribute change delegate and call an update bar on attribute change
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.