Author Topic: How do I go about making an item restore energy on use?  (Read 653 times)

Basically the player's energy variable, or the fuel jet bar. I really need to know this

Take a look at the pill and use %player.setEnergyLevel(NUMBER);

Take a look at the pill and use %player.setEnergyLevel(NUMBER);

How would I go about setting it up so it adds energy rather than setting it?

There is no function for adding energy. So you have to do %player.setEnergyLevel(%player.getEnergyLevel() + NUMBER); Or you can do %player.setEnergyLevel(%player.getDataBlock().maxEnergy); to fill their energy.


also for convenience you could make what jes has shown you into your own add energy function.

also if this is for what iithink it is tell me how you do it because I needed it for the fists power attack

also if this is for what iithink it is tell me how you do it because I needed it for the fists power attack
Please keep the discussion constructive as far as the question goes and understandable to all or move it to PM. It's a kind of pleasant theme in Coding Help.