Jump to content

Tatar

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Tatar

  • Rank
    Private First Class
  1. Tatar

    Dynamic #includes

    he has: missionFolder/someName1/cfgSounds.ext missionFolder/someName2/cfgSounds.ext missionFolder/someName3/cfgSounds.ext missionFolder/someName4/cfgSounds.ext he want to do something like: #includeAllCfgSounds how this should help him ?
  2. Tatar

    Dialog Doesn't Appear

    hi try to do it easy.. description.ext class RscTitles { class MY_superDialog { idd = -1; duration = 15; movingEnable = false; enableSimulation = false; controls[] = { "MY_superControl" }; onLoad = "uiNamespace setVariable [""MY_superDialog_display"", _this select 0];"; class MY_superControl { idc = 666; type = 13; style = 0; text = "It works!"; size = 0.05; colorBackground[] = { 0, 0, 0, 1 }; colorText[] = { 1, 1, 1, 1 }; x = 0; y = 0; w = 1; h = 1; }; }; }; init.sqf onPreloadFinished "0 cutRsc ["MY_superDialog", "PLAIN", 1, false];";
  3. Tatar

    Dynamic #includes

    hi #include is preprocessor command you cant do anything dynamic with them.. :(
  4. Tatar

    Team-wide Timeout Trigger

    if i understand you right.. you will have to "spawn" another script in parallel.. best way to do so is to create your own function.. it could be something like this.. on activation: _null = [] spawn MY_fnc_superFunction; MY_fnc_superFunction :) sleep 10; ...do something..... ....anyway the activation will be local...
  5. description.ext class CfgDebriefing { class myOwnEndName1 { title = "title"; subtitle = "subtitle"; description = "description"; picture = "b_inf"; pictureBackground = ""; pictureColor[] = { 1.0, 1.0, 1.0, 1 }; }; class myOwnEndName2 { title = "title"; subtitle = "subtitle"; description = "description"; picture = "b_inf"; pictureBackground = ""; pictureColor[] = { 1.0, 1.0, 1.0, 1 }; }; }; if (time > _timeLimit) then { private "_end"; _end = "myOwnEndName1"; if (alive VIP) then { _end = "myOwnEndName2"; }; [[_end, true, true], "BIS_fnc_endMission", true, true] call BIS_fnc_MP; _continue = false; }; note that second argument for BIS_fnc_endMission isnt victory/loose but completed/failed its not a "graphic" function, it actually can change the text what you can see on debriefing if you dont define "what the end is" but its main feature is that it keeps or deletes the actual mission proggres.. if mission fails progress is saved and you can continue from last save, but if the mission is completed the saved progress is deleted... because mission was completed........ btw.. im sorry i didnt notice that you posted your reply so fast.. look at the code again i edited it little bit...
  6. uf uf i hate errors.. i just lost my reply so i will short it.. you are mixing two differen things together.. first of all, time is local, each machine compute time on its own.. facts: time is synced only once per client (on connection) time can "run slower" example: you are connecting to the server server givs you time (computed by server) since that your machine compute time by its own... scenario one: server have performance problems.. server time runs slower your time runs normally scenario two: you have performance probmes.. server time runs normally your time runs slower so.. this code... START_TIME = diag_tickTime; while {true} do { ELAPSED_TIME = diag_tickTime - START_TIME; publicVariable "ELAPSED_TIME"; sleep 1; }; is theoretically useful if u need same "time value" on each machine........ my suggestion....... never use that... its useless... im sorry... :o so... yeah... lets say that you care about performance of your scripts (in fact you always should :) ) triggers checks for their conditions twice per second.. you dont have to do that so "fast" when your time limit is one hour.. suggested solution: init.sqf if isServer then { private ["_delay", "_timeLimit"]; _timeLimit = 3600; _delay = 2; [_timeLimit, _delay] spawn { private ["_continue", "_delay", "_timeLimit"]; _timeLimit = [_this, 0, 3600, [0]] call BIS_fnc_param; _delay = [_this, 1, 2, [0]] call BIS_fnc_param; _timeLimit = _timeLimit - _delay; _continue = true; waitUntil { time > 0 }; while { _continue } do { if (time > _timeLimit) then { [["EndName", true, true], "BIS_fnc_endMission", true, true] call BIS_fnc_MP; _continue = false; }; sleep _delay; }; }; };
  7. hi i believe that there is nothing better then the time command you should look at it from the other side... do not overload your server :cool:
  8. east, west, resistance, civilian str resistence == "GUER" https://community.bistudio.com/wiki/Side
  9. at the end... they always can... :( ...crucial informations are stored in variables (for example BIS_fnc_MP_queue) and if they manage to change it...... and there is also not big magic around this functions.. it uses publicVariable..
  10. it's not broken.. :rolleyes: i'm using this function regularly in loops (with delay) and i never experienced any troubles with that.. :cool: btw.. thanks for great game.. :o
  11. hi _countEastVehicles = { side _x == east } count vehicles; _eastVehiclesInArray = []; { if (side _x == east) then { _eastVehiclesInArray set [count _eastVehiclesInArray, _x]; }; } forEach vehicles;
  12. Hi.. it depends on how the task was created.. the function you re asking for is called BIS_fnc_taskReal, it returns task object from given task name.. you can also check if BIS_fnc_taskExists with task name.. anyway.. you dont have to do this.. if you create your task with BIS_fnc_createTask or BIS_fnc_setTask, you can later use BIS_fnc_setTaskState, that function works with task name..
×