Hey, I’m having a problem. I am making a Tactical RPG and right now I’m just coding the basics and I’m trying to get the attack working. So the first image is of my function which is in my player character blueprint (basically character selector). it is getting info from collision then inputting that into the function. the problem is the math is not working. what it’s supposed to do is roll a number 1-20 then add that to the selected character’s health and see if that’s higher or equal than the character’s we are attacking def if so minus 1 hp. I’m having it print the numbers so first is the attack roll second is the def and then whether it’s true or false but it is only triggering when it’s false despite being hooked up to true and sometimes it says just the wrong thing like 21 is greater than 10 but it will still say false. any help would be very appreciated.
Pure nodes get called once per connection to any of their pins
So the random int in range node that you have will be run once for the first and once for the third print string nodes and once for the branch, so 3 times in total, and each time a new random will be generated. You should cache its result to a local variable if you want it to work
Do you cache a pure "get" functions result if using it on tick/input axis? - #2 by zeaf I’ve written some more information on the subject for this answer, might be useful
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.