Jump to content
  • 0

Does anybody have a No-Fatigue Script?


Liqu1dShadow

Question

19 answers to this question

Recommended Posts

  • 0

Hey, i have been trying it out on my server to see if it works and it is working. As for the aiming shake not working with fatigue off, i would go download on armoholic the script named "DamageSystemEffect". In there there is a shake effect depending on how much health you have. You could always go and change it so it doesn't look for health but for player speed instead.

Exemple:

if player speed is greater than 0, you activate the shake effect until player speed is back at 0, and put a sleep or something when reaching 0 for a good 5 to 15 seconds so the shake effect will activate when running, and stop for x number of second after you stopped walking. This is the only thing i can think of right now.

At least it's a start in the good direction for you if you want to try something and doesn't know where to start :D

Link to comment
Share on other sites

  • 0

Just tested it, and the aiming swing when fatigue is off seems to work but as if you were full stamina and has no fatigue. So the aim will swing a bit more standing up, a bit less crouched and almost no swing lying down. But the swing is soo low it's almost unoticable.

I think with the help of the Damage system script, you could achieve what you are looking for.

EDIT: I can try and make something this weekend for the aiming swing with damage effect, but no promise, i am only a copy paster editor of already made script.

Link to comment
Share on other sites

  • 0

This is my init file, but it does not seem to work? :( 

 

// Welcome Credits
[] execVM "custom\welcome.sqf";

// No Fatigue
player enableFatigue false;

//Zombies
if (isDedicated) then {
    [] execVM "\q\addons\zombiemission\init.sqf";
};
[] execVM "zombie\compiles.sqf";
"playZSoundHurt" addPublicVariableEventHandler {(_this select 1) call fncNextSound};
"playZSound" addPublicVariableEventHandler {(_this select 1) call fncNextSound};

// Status Bar
[] execVM "scripts\fn_statusBar.sqf";

/// Init.sqf DbD Clan Chernarus
execVM "start_blck.sqf";

//If server execute this script
if (isServer) then {
    execVM "\q\addons\custom_server\init.sqf";
//If anything but server execute this script
} else {
    [] spawn {
        //This is to spawn the markers when players enter after server has started
        [] execVM "debug\addmarkers.sqf";
        [] execVM "debug\addmarkers2.sqf";
        [] execVM "debug\addmarkers75.sqf";
        [] execVM "debug\addmarkers752.sqf";
        //Event handler to show messages to players // this can be used for other scripts to send messages to players -- see AIM.sqf
        "blck_Message" addPublicVariableEventHandler {titleText[format["%1",_this select 1],"PLAIN DOWN",1];};
    };
};

Link to comment
Share on other sites

  • 0

I think you will have to do as itsatrap posted if it still doesn't work for you. I got the disable fatigue in init, and also disabled fatigue on player respawn from custom loadout.
my init:

/*==isServer==============================================================================*/
if (isServer) then {
	//Loot
    fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "custom\LSpawner\fn_LSgetBuildingstospawnLoot.sqf";
    LSdeleter = compile preProcessFileLineNumbers "custom\LSpawner\LSdeleter.sqf";
    execVM "custom\LSpawner\Lootspawner.sqf";
	//VEMF
	[] ExecVM "\VEMF\init.sqf";
};
/*==!isDedicated==========================================================================*/
if (!isDedicated) then {
	//VEMF Mission
	"VEMFChatMsg" addPublicVariableEventHandler {
		systemChat ((_this select 1) select 0);
		[
			[
				[((_this select 1) select 0),"align = 'center' size = '1' font='PuristaBold'"],
				["","<br/>"],
				[((_this select 1) select 1),"align = 'center' size = '0.5'"]
			]
		] spawn BIS_fnc_typeText2;
		VEMFChatMsg = nil;
	};
};
/*==hasInterface==========================================================================*/
if (hasInterface) then { 
	//SEM
	execVM "semClient.sqf";
	//Earplug+Radio
	waituntil {!isnull (finddisplay 46)};
	earplugsout=true;
	radio=true;
	execVM "cmEarplugs\cm_veh_init.sqf";
};
/*==Autres================================================================================*/
//Fatigue-OFF
player enableFatigue false;
//Starting loadout
[] execVM "custom\spawn.sqf";
//Status Bar
[] execVM "custom\statusbar\fn_statusBar.sqf";
//PM message
[] execVM "JTS_PM\Functions.sqf";
//Chat
[] execVM "module_chatIntercept\init.sqf";
//Welcome
[] execVM "custom\WelcomeMessage.sqf";
//PP
[] execVM "DamageSystemEffect\pp.sqf";
//A3EAI Client
#include "A3EAI_Client\A3EAI_initclient.sqf";
/*========================================================================================*/

 

And my loadout spawn.sqf:

//Custom loadout

private ["_player"];
if (!isServer) then {
	waitUntil {!isNull player};
	waitUntil {player == player};
	
	while {true} do {
			_player = player;
			player addEventHandler ["Respawn", {

			_PistolANDmag = [["hgun_P07_snds_F","16Rnd_9x21_Mag"],["hgun_Pistol_heavy_02_F","6Rnd_45ACP_Cylinder"],["hgun_Pistol_heavy_01_MRD_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_snds_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_F","11Rnd_45ACP_Mag"],["hgun_ACPC2_snds_F","9Rnd_45ACP_Mag"],["hgun_ACPC2_F","9Rnd_45ACP_Mag"],["hgun_P07_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
			_pistol = _PistolANDmag select 0;
			_mag = _PistolANDmag select 1;
			_item = "FAK";
			_food = ["sardines_epoch","meatballs_epoch"] call BIS_fnc_selectRandom;
			_drink = ["ItemSodaPurple","WhiskeyNoodle"] call BIS_fnc_selectRandom;
                        _uniform = ["U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;
			_vest = ["V_14_EPOCH","V_13_EPOCH","V_12_EPOCH","V_11_EPOCH","V_9_EPOCH","V_8_EPOCH","V_6_EPOCH","V_5_EPOCH","V_4_EPOCH","V_3_EPOCH","V_2_EPOCH","V_1_EPOCH"] call BIS_fnc_selectRandom;

			player addVest _vest;
			player addWeapon _pistol;
			player addMagazine _mag;
			player addMagazine _item;
			player addMagazine _food;
			player addMagazine _drink;
			player addWeapon "EpochRadio0";
			
				_Male = (typeOF player == "Epoch_Male_F");	
		// Male
                if (_Male) then {
                    player forceAddUniform _uniform;
					1 fadeSound 1;
					1 fadeMusic 1;
					earplugsout=true;
					radio=true;
					playMusic "";
					player enableFatigue false;
		// Female
				}else{
                    player forceAddUniform "U_BasicBodyFemale";
					1 fadeSound 1;
					1 fadeMusic 1;
					earplugsout=true;
					radio=true;
					playMusic "";
					player enableFatigue false;
                };
		}]; waitUntil {_player != player}; 
	}; 
};

 

if it's still doesn't work, you could make a new sqf, and call the script below from the init.

On player respawn disable fatigue:

//On Respawn disable fatigue
private ["_player"];

if (!isServer) then {
	waitUntil {!isNull player};
	waitUntil {player == player};
	
	while {true} do {
		_player = player;
		player addEventHandler ["Respawn", {
		_Male = (typeOF player == "Epoch_Male_F");	
			// Male Model
				if (_Male) then {
				player enableFatigue false;
			// Female Model
				}else{
				player enableFatigue false;
                };
		}]; waitUntil {_player != player}; 
	}; 
};

Link to comment
Share on other sites

  • 0

@TolH
Why do You check if the player model is male/female to execute the same code anyways?
Why adding the respawn EH continually, a respawn EH will be present as long as the client is on the server, no matter how many times he dies (except the EPOCH code removes all "respawn" EH).
And please get used to add local variables to a "private" array.

Or with the words from itsatrap:

why over complicate it ?


Greez KiloSwiss

Link to comment
Share on other sites

  • 0

@TolH

Why do You check if the player model is male/female to execute the same code anyways?

Why adding the respawn EH continually, a respawn EH will be present as long as the client is on the server, no matter how many times he dies (except the EPOCH code removes all "respawn" EH).

And please get used to add local variables to a "private" array.

Or with the words from itsatrap:

Greez KiloSwiss

Like i said, i am no scripter, was just trying to provide exemple with the spawn.sqf i already had and the limited knowledge i have. But thanks for the heads up.

Is this will only be executed when the player respawn ?

[] spawn {

    // No fatigue

    while {true} do {

        player setFatigue 0;

        uiSleep 6;

    };

};

 

Also found this on Bi, would it be better to use this instead to execute a script on player respawn ? Or is "[] spawn {// No fatigue while {true} do {" best to use instead ?

class CfgRespawnTemplates
{
	// Class used in respawnTemplates entry
	class myTag_beacon
	{
		// Function or script executed upon death. Parameters passed into it are the same as are passed into onPlayerKilled.sqf file
		onPlayerKilled = "\myAddon\scripts\respawnBeacon.sqf";
		// Function or script executed upon respawn. Parameters passed into it are the same as are passed into onPlayerRespawn.sqf file
		onPlayerRespawn = "\myAddon\scripts\respawnBeacon.sqf";
		// Default respawn delay (can be overwitten by description.ext entry of the same name)
		respawnDelay = 20;
		// 1 to respawn player when he joins the game. Available only for INSTANT and BASE respawn types
		// Can be overridden by description.ext attribute of the same name
		respawnOnStart = 1;
	};
	class Spectator
	{
		onPlayerRespawn = "BIS_fnc_respawnSpectator";
	};
};

Thanks

Link to comment
Share on other sites

  • 0
On 2/18/2015 at 6:27 PM, itsatrap said:

[] spawn {
	// No fatigue
	while {true} do {
		player setFatigue 0;
		uiSleep 6;
	};
};

I use this code, seam to work 

added to init.sqf

Thanks, this is working perfectly even in the latest version - repped.

Link to comment
Share on other sites

  • 0

For what it;s worth, this is what I have in my init.sqf (was added after the original change):

if(!isDedicated && hasInterface)then{
    waitUntil{vehicle player == player};
    waituntil{!isnull (finddisplay 46)};
    waitUntil{alive vehicle player};
    waitUntil{typeOF player != "VirtualMan_EPOCH"};
        player enableStamina false;
        player setCustomAimCoef 0.15;
};

Has worked perfectly since the ARMA change... No external scripts needed, persists through respawn. Was originally posted by someone else on this or BIS's forum, can't remember which.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...