I am trying to set a magnitude for the stat power up collectable based on certain game events and when I set a negative magnitude the call fails… Is this not a feature or am I doing something wrong?
The calls with the green checkmark complete as expected…
The API for that call says it’s clamped to what’s set in the device. What is your magnitude set to on the device itself?
# Used to increase or decrease a stat for an `agent`.
stat_powerup_device<public> := class<concrete><final>(powerup_device):
# Sets the *Magnitude* for this powerup, clamped to the Min and Max defined in the device.
# Will not apply to any currently applied effects.
# For the Stat Powerup, this is the value of the stat that the powerup will add or remove to a player that picks up the powerup.
SetMagnitude<public>(Magnitude:float):void = external {}
# Returns the current *Magnitude* for the powerup.
# For the Stat Powerup, this is the value of the stat that the powerup will add or remove to a player that picks up the powerup.
GetMagnitude<public>()<transacts>:float = external {}
I have it set at 10.0, so it theoretically the call should work being set as anything from -10.0 to 10.0 right? Or am I missing something? The documentation mentions in regards to the stat_creator_device
that if you are not using levels then the call wont work but if you are then it succeeds? The stat_powerup_device
is intrinsically connected so I am positive those settings have effect over my usage but the verbiage in the docs and api is not very good…maybe ill see if claude or gemini can rephrase how the usage and api docs are written and get a better understanding cause im super confused and being that it’s persistable it’s almost impossible to simulate and test the settings of the device[s]
It doesn’t look like the Min/Max for the Magnitude isn’t exposed for us to use. Maybe you could run loads of SetMagnitude
and GetMagnitude
tests to see what the Min/Max is.