Audio Rejectz
Well-Known Member
Having a play around with this, but to no avail. Im going to keep at it, but here is the basis for it if anyone wants to try and have a play with it
in the ini
tentsleep.sqf
sleep1.sqf
in the ini
Code:
if (!isDedicated) then {
[] execVM "tentsleep.sqf"
};
tentsleep.sqf
Code:
// action - dream
_find = nearestObjects [player, ["TentStorage"], 20];
{
_rts = _x getVariable ["rtosleep", -1];
if(_rts < 0) then {
_x addAction ["sleep", "sleep1.sqf"];
_x setVariable ["rtosleep", 1];
};
};
sleep1.sqf
Code:
if(myISleep < 1) then {
myISleep = 1;
player globalChat "rest";
_unit = player;
//_unit removeAction mySleepAction;
//mySleepAction = -1;
_unit playMove "AidlPpneMstpSnonWnonDnon_SleepA_sleep3";
WaitUntil {(animationState _unit != "AidlPpneMstpSnonWnonDnon_SleepB_sleep1")};
//sleep 5;
//titleCut [" ","BLACK OUT", 3];
//5 FadeSound 0;
//sleep 5;
_unit switchMove "AidlPpneMstpSnonWnonDnon_SleepA_death";
_timesleep = time;
_timec = time;
_done = false;
_tconst = 0.0625; //0.125 0.0625 0.03125
While {(inputAction "moveForward"!=1) and (!_done)} do {
sleep 0.5;
skipTime _tconst;
//_currenttime =str(floor(daytime));
_timec = _timec + (3600 * _tconst);
_sleeptime = _timec - _timesleep;
if(_sleeptime >= (60*60*6)) then {_done = true;};
_h = floor(_sleeptime / (60*60));
_m = floor((_sleeptime - (_h * 60*60)) / 60);
hintSilent format["time sleep %1:%2\wake up - W", _h, _m];
};
_unit switchMove "AidlPpneMstpSnonWnonDnon_SleepA_sleep3";
sleep 3;
//titleCut [" ","BLACK IN", 5];
//15 FadeSound 1;
//sleep 15;
player globalChat "Rise";
//mySleepAction = player addAction ["sleep", "sleep1.sqf"];
hintSilent "";
myISleep = 0;
};