Jump to content
Sign in to follow this  
Coolinator

How to take out the stamina for soldiers or make it infinite stamina?

Recommended Posts

One should try to avoid unnecessary loops and new threads as much as possible.

Oh... in another thread which I opened the other day we talked about threads and consensus was, it's unimportant how many threads you open, it's important what you do inside them. But I do not care too much, in my weather script e.g., it's just about 1 vs. 4 threads, I guess it's not a problem. But my stomach however tells me that multiple threads with while/sleep are evil.

Share this post


Link to post
Share on other sites
One should try to avoid unnecessary loops and new threads as much as possible. I would suggest you to approach this issue the following way:

1. In your mission folder, create a file and name it initPlayerLocal.sqf (Runs at mission start for every client, when they join the mission)

2. Inside initPlayerLocal.sqf disable the fatigue

player enableFatigue false;

3. Also inside initPlayerLocal.sqf add a respawn event handler (is executed every time player respawns)

player addEventHandler ["Respawn", { (_this select 0) enableFatigue false; }];

So what this will do is disabling the fatigue when the Player joins the mission, and every time he respawns the fatigue is also disabled.

See also:

Event_Scripts

Arma_3:_Event_Handlers - Respawn

Hi neo. 3 identical snippets have already been posted. It's great for a dev to reply though :)

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  

×