Jump to content
Sign in to follow this  
Normal Norm

Adding Parameters To Mission

Recommended Posts

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

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

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;};

 

  • Like 1

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  

×