Author Topic: Displaying the Energy left  (Read 652 times)

Alright, I'll start off saying that I'm new to scripting and am only just learning, so this might not make sense.

I am trying to create a script that displays how much energy you have left, energy being the blue bar in the top-right hand corner of your screen when using a player type such as fuel-jet player. I know how to do the actual display part and I also know how to make it work perfectly for your health. All I really need to know is if there is a specific line of code that would be able to get the energy level.

In short:
Code: [Select]
%hp = mCeil(%pl.getDatablock().maxDamage - %pl.getDamageLevel());This is a line of code that finds the damage level of a player, so how can I turn this into a line of code that instead finds the energy level of a player?
« Last Edit: November 19, 2009, 10:25:28 PM by Blobeh »


findClientByName("Blobeh").player.dump();

That'll put all the player methods into the console. If you skim through it for key words, you can usually find what you're looking for - In this case, skim for 'energy', and you'll find what Space posted.

%pl.getEnergyLevel();
Thank you, I hought that this might be it but I didn't have enough time to check.

findClientByName("Blobeh").player.dump();

That'll put all the player methods into the console. If you skim through it for key words, you can usually find what you're looking for - In this case, skim for 'energy', and you'll find what Space posted.
Oh right, I forgot about this.

I also know how to make it work perfectly for your health.
Out of curiosity, how did you get around the "players can't die the first time they are damaged" problem as seen in iBan's health players.

Blobeh if your blockland name is the same can you tell me where to find the Halo grab and throw?

Blobeh if your blockland name is the same can you tell me where to find the Halo grab and throw?

This relates to this topic how?