Hello , i am making a survival game where depending on the food you eat you get nutrition that boosts your stats ( speed , bone strenght , health , stamina ) and if you dont eat plants the characetr you play as wants you dont gain nutrition and your stats decrease , i made a blueprint that should make the nutrition level affect the stamina but it didnt work at all , you can find it here 123 posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4 , if you can , please let me know how to make it or how to make it work correctly ( im somewhat new so please make the answer simple if possible )
You tests are a bit screwed up. First you test > 100, ok. Then you test < 50. Well, everything under 50 is less than 50
You’re never going to get to those other bits of code, because 37 and 25 will also be caught by the first test.
Also, there’s a MUCH easier way of doing this, without tick even. Tick is called EVERY FRAME, there’s no need to have an event at the end calling it again!
I will come back…
Ok, I haven’t tested this, but the idea is sound. Your basic loop is
CheckHealth is a function like this
And ( as best as I could copy your logic ), the UpdateHealth custom event is
Actually, I think that update node can be simplified to