You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the self.Functions.SetMetaData function runs too quick. when a value is above the max, it just sets the value back to the value (above the max).
Reproduction
Adding a Statebag Getter for Food and Printing It
Eating Food from ox_inventory when having 100 Hunger
Expected behavior
Getting 2 Statebag Changes. The Initial Value from ox_inventory and then the Value being set by self.Functions.SetMetaData
Actual behavior
Getting 3 Statebag Changes. the First Being the Initial Value Set by Ox_Inv (The Value thats too High), the Second Value being 100 (The Value Set by the self.Functions.SetMetaData function). and Third, the Initial Value from Ox_Inv (Again).
this Results in the Hunger Value Staying at the High Value.
Additional context
No response
Current Version
v1.20.1
Custom Resources
none affecting status / hunger.
The text was updated successfully, but these errors were encountered:
This is due to setting the value prior to clamping the value then setting it to the statebag. The value needs to be clamped before being set to the statebag. Good catch
Summary
the self.Functions.SetMetaData function runs too quick. when a value is above the max, it just sets the value back to the value (above the max).
Reproduction
Expected behavior
Getting 2 Statebag Changes. The Initial Value from ox_inventory and then the Value being set by self.Functions.SetMetaData
Actual behavior
Getting 3 Statebag Changes. the First Being the Initial Value Set by Ox_Inv (The Value thats too High), the Second Value being 100 (The Value Set by the self.Functions.SetMetaData function). and Third, the Initial Value from Ox_Inv (Again).
this Results in the Hunger Value Staying at the High Value.
Additional context
No response
Current Version
v1.20.1
Custom Resources
none affecting status / hunger.
The text was updated successfully, but these errors were encountered: