Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Exposing a getter/setter for player energy

Give us your input on how we may improve the ScriptAPI in the game in future versions.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
JakSparro98
Superfighter
Superfighter
Posts: 516
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 21

Exposing a getter/setter for player energy

Post by JakSparro98 » Mon Jan 13, 2020 12:31 am

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

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1716
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 29

Post by Gurt » Sat Jan 18, 2020 11:30 pm

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.
1 x
Gurt

Post Reply