Jump to content
Sign in to follow this  
BEAKSBY

Stamina Status Bar

Recommended Posts

Has any one created a way to only modify the stamina of a player and present it as a status bar?

Share this post


Link to post
Share on other sites

Yes I have, but your post comes across as lazy.

Have you done anything to find this out yourself? You can't expect people to give you the solution if you have done nothing to work it out yourself.

I don't even know how you want it modified.

Read the following for more info:

https://community.bistudio.com/wiki/getFatigue

https://community.bistudio.com/wiki/setFatigue

https://community.bistudio.com/wiki/enableFatigue

https://community.bistudio.com/wiki/createDisplay

https://community.bistudio.com/wiki/Dialog_Control

Share this post


Link to post
Share on other sites

You' right. Thanks for the starting points. I wasn't sure what it was called, i.e. endurance, stamina...etc.

I am trying to modify the fatigue level for different player selections from the repawn template. I want to exaggerate the fatigue and recovery for certain soldier loadouts. So light weight sniper character can run faster/longer compared to heavier weapon support soldiers character.

I would like to display the fatigue level as a status bar so players can strategicaly choose when and know how much sprint they have.

I've seen a health status bar script develloped by Maxjoiner and was wondering if there was something similar with fatigue?

Edited by BEAKSBY

Share this post


Link to post
Share on other sites

Okay, well I wasn't having a go at you - It's just frustrating to see people with perfectly good brains not use them sometimes :)

If you are trying to override the default fatigue system then you can take a leaf out of this:

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage

One of the notes says this:

You can save the last event as timestamp (diag_tickTime) onto the unit, as well as the current health of the unit/its selections, with setVariable and query it on each "HandleDamage" event with getVariable to define a system how to handle the "HandleDamage" event.

You could do the same approach for fatigue, where you run a loop over the player and check every second or so. If the weaponset == "XXX" then add (slight) additional fatigue to the current level.

while {alive player} do {
   _fat = getFatigue player;
   YOURTAG_superVar = do something here based on class and movement and _fat etc;
   player setFatigue YOURTAG_superVar;
   sleep 1;
};

The display would need to be on a separate loop that refers to YOURTAG_superVar

Edited by Das Attorney

Share this post


Link to post
Share on other sites

No worries,

I'll work on this and post my results.

Thanks for the support!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×