Search the Community
Showing results for tags 'skip'.
Found 2 results
-
[Resolved] Skip time function working in multiplayer
YDrogen posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi everyone ! So I have a really simple question that I'm sure you have already seen before. It's about skip time, but more like "X hours and Y minutes. I'm searching for hours now, I keep trying again and again, without any success. Even the BIKI can't make me do things correctly ! :( So here I am ! I have made 2 samples to my function : cutText ["", "BLACK FADED", 600]; private ["_hoursToSkip","_minutesToSkip"]; _msg = [[" _hoursToSkip HEURES AND _minutesToSkip MINNUTES LATER ... ","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]]spawn BIS_fnc_typeText; _hoursToSkip = _this select 0; _minutesToSkip= _this select 1; skipTime (_hoursToSkip + 0._minutesToSkip - daytime + 24 ) % 24; waitUntil{scriptDone _msg}; cutText ["", "BLACK IN", 5]; cutText ["", "BLACK FADED", 600]; private ["_hoursToSkip","_minutesToSkip"]; _msg = [[" _hoursToSkip HEURES ET _minutesToSkip MINNUTES PLUS TARD ... ","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]]spawn BIS_fnc_typeText; return date = _actualDate; _actualDateN = dateToNumber _actualDate; _actualDateN + _hoursToSkip*0.00274 + _minutesToSkip*0.000046 = _newDateN; _finalDate = numberToDate _newDateN; setDate _finalDate; waitUntil{scriptDone _msg}; cutText ["", "BLACK IN", 5]; Declared in the "description.ext" file : class CfgFunctions { class Y { class timeSkip { file = "functions"; class timeSkip {}; ext = ".sqf"; }; }; }; Saved as "functions\fn_timeSkip.sqf" and detected in the InGame function menu aswell. None of them works with this command : [["5","5"],"Y_fnc_timeSkip",true,true] call BIS_fnc_MP; I need to make it work in multiplayer. The beginning of the function work great, I got a black screen. But nothing else. Sometimes, the _msg appears (with [5,5] as array instead of ["5","5"]), sometimes not. Can you help me with that ? Thanks a lot ! :) Full working code here (link to reply on this topic) -
[SOLVED] Looping switch-do, skip a case if true during earlier loop
Asmodeuz posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, the short script I've typed below is checking whether a player is inside a marker's area (or not). When the player is (inside the marker's area) an action "Test action" will be added to the player's action menu. Now, since the script is being looped a new action menu entry gets added to the action menu every 5 seconds. Thus far haven't been able to come up with anything meaningfull so: is there a way to stop new action menu entry being added if one has already been added during the earlier loop? [] spawn {while {alive player} do {switch (true) do { case (player inArea "marker1"): {testActionID = player addAction ["Test action",{}];}; case !(player inArea "marker1"): {player removeAction testActionID}; }; sleep 5; }; };