Normal Norm 19 Posted October 9, 2017 Hi Guys. I am creating a new mission and I would like to add the following parameters if possible Fatigue enabled/disabled Stamina enabled/diasbled Weather - Choice of weather Time of Day Would somebody be kind enough to help me out with this one. I have tried and failed at this a few times over the past 2 days. Many Thanks EDIT: If figured out how to do the Time of day and Weather parameters, its just the stamina and fatigue im really stuck on. In the Description.ext file i have added class Params{ class PlayerFatigue //paramsArray[2] { title = "Player Fatigue"; values[] = {0,1}; texts[] = {"Fatigue Disabled","Fatigue Enabled"}; default = 0; }; #include "\a3\functions_f\Params\paramDaytimeHour.hpp" #define DAYTIMEHOUR_DEFAULT 5 #include "\a3\functions_f\Params\paramWeather.hpp" #define WEATHER_DEFAULT 100 }; And In the InitPlayerLocal.sqf file I have added if ((paramsArray select 2) == 0) then { player enableFatigue false; player addEventhandler ["Respawn", {player enableFatigue false}]; }; All three parameters show up, The weather and time of day parameters work as it should, the Fatigue parameter shows up but stamina is always disabled no matter which option is selected :( Share this post Link to post Share on other sites
Normal Norm 19 Posted October 9, 2017 What am I missing to enable the fatigue parameter to work correctly? Share this post Link to post Share on other sites
pierremgi 4888 Posted October 9, 2017 You never use paramsArray (my bad). I always use bis_fnc_getparamValue, more explicit for the aimed param class Share this post Link to post Share on other sites
Normal Norm 19 Posted October 9, 2017 Problem solved, the above worked fine, i had another file OnPlayerRespawn.sqf which was conflicting. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted October 9, 2017 Description.ext class Fatigue { title = "Player Fatigue"; values[] = {0,1}; texts[] = {"Disabled","+ Enabled"}; default = 0; }; Parameters.sqf Fatigue = "Fatigue" call BIS_fnc_getParamValue; InitPlayerLocal.sqf #include "Parameters.sqf" if (PARAMS_Fatigue == 0) then { player enableFatigue FALSE;}; onPlayerRespawn.sqf if (PARAMS_Fatigue == 0) then {player enableFatigue FALSE;}; 1 Share this post Link to post Share on other sites