This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
Exposing a getter/setter for player energy
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- JakSparro98
- Superfighter

- Posts: 530
- Joined: Fri Jul 15, 2016 7:56 pm
- Started SFD: PreAlpha 1.0.5
- Location: Rome, Italy
- Gender:
- Age: 27
Exposing a getter/setter for player energy
Today we can access player's health by invoking it's inherited method from IObject, however currently is not possible to manipulate/read the stamina/energy value, pretty weird it wasn't planned in any way, am I missing something?
1 x
- Gurt
- Lead Programmer

- Posts: 1887
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 36
You can only activate infinite energy using modifiers per player or use the global /ie 1 command.
You can not update the stamina value as that wouldn't reliably be predictable by the client, causing a lot of problems. If there's not a getter for the stamina already I will try to add one for the next update.
Edit: ScriptAPI: Added IPlayer.GetEnergy(), IPlayer.GetMaxEnergy() to read current energy from a player (v.1.3.4)
You can not update the stamina value as that wouldn't reliably be predictable by the client, causing a lot of problems. If there's not a getter for the stamina already I will try to add one for the next update.
Edit: ScriptAPI: Added IPlayer.GetEnergy(), IPlayer.GetMaxEnergy() to read current energy from a player (v.1.3.4)
2 x
Gurt