Jump to content

YDrogen

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Everything posted by YDrogen

  1. 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)
  2. Hi ! I wanna create a new task using the Task Enhancement, with 3D markers ... So here is the thing : ["fDIN", true, ["Get in","Get in","hostel"], ([], "ASSIGNED", 1, false, true, "GetIn", true)] call BIS_fnc_setTask; [params, target, desc, (dest, state, priority, showNotification, isGlobal, type, shared)] call BIS_fnc_setTask; My syntax is correct, the marker "hostel" is there in the editor. No error, but not working. There is no example to refer in the BIKI (here)so.. Thanks in advance !
  3. You need to spawn an object named "poloCar" or change the name in the function param #3 [NAME, true]. class CfgTaskTypes { class Attack { icon = \A3\UI_F_MP_Mark\Data\Tasks\Types\Attack_ca.paa; icon3D = \A3\UI_F_MP_Mark\Data\Tasks\Types3D\Attack_ca.paa; }; class Defend { icon = \A3\UI_F_MP_Mark\Data\Tasks\Types\Defend_ca.paa; icon3D = \A3\UI_F_MP_Mark\Data\Tasks\Types3D\Defend_ca.paa; }; }; It's useless if you are using presets like "Attack", "Defend" or anything else listed in the BIKI. Now I'm using this in the description.ext It works better I think. taskManagement_markers3D = 1; taskManagement_markers2D = 1; //0: do not use new 2D markers (default), 1: replace task markers with new 2D markers taskManagement_propagate = 1; //0: do not propagate (default), 1: propagate shared tasks to subordinates taskManagement_drawDist = 10; //3D marker draw distance as UNASSIGNED (default: 2000)
  4. It has been introduce in the 1.48 (see here)
  5. Update : My new syntax : In description.ext : class CfgTaskTypes { class Getin { icon = \markers\GetIn\GetIn.paa; icon3D = \markers\GetIn\GetIn3D.paa; }; }; In .sqf : [playersteam, ["getinpoloCar"],["Monter dans le Tout-terrain", "Monter dans le Tout-terrain", "Monter dans le Tout-terrain"], [poloCar, true], "ASSIGNED", 1, true, "Getin", true] call BIS_fnc_taskCreate; Icons actually works. But not mine, only the defaults ones (Attack / Defend / ... ). I respect all the required conditions, texture size, .paa format, centered, white, transparent background, 100% aplha.. I don't understand. You can see them here : http://imgur.com/a/dfR1p
  6. You need to copy your loadout in your clipboard (simple CTRL+C) and paste it in the Virtual Arsenal (CTRL+V)
  7. Yep. Still have the default one
  8. I have tried that too, but still not working. I'm using 64x64 white icon with transparent background and 4px on each border (.png to .paa) for the 2D icon, and 128x128 white icon with transparent background and 4px on each border too (from .png to .paa) for the 3D icon.
  9. So I can even use ["fDIN", true, ["Get In","Get In","Get In"], [poloCar, true], "ASSIGNED", 1, true, true, "GetIn", true] call BIS_fnc_setTask; Thanks ! I didn't knew that parenthesis must not be there when it's optional and actually means that what's inside them, it's optional only. But now, my 2D/3D markers don't work I have this in my description.ext : class CfgTaskEnhancements { enable = 1; //0: disable new task features (default), 1: enable new task features & add new task markers and task widgets into the map 3d = 1; //0: do not use new 3D markers (default), 1: replace task waypoints with new 3D markers 3dDrawDist = 10000; //3d marker draw distance (default: 2000) share = 1; //0: do not count assigned players (default), 1: count how many players have the task assigned propagate = 1; //0: do not propagate (default), 1: propagate shared tasks to subordinates }; class CfgTaskTypes { class GetIn { icon = \markers\GetIn\GetIn.paa; icon3D = \markers\GetIn\GetIn3D.paa; }; }; And I still have the default Arma 3 marker instead of this
  10. Exact ! _msg = [[str _hoursToSkip, " HEURES ET", str _minutesToSkip, "MINUTES PLUS TARD ... ", "<t align = 'center' shadow = '1' size = '1.0'></t>"]]spawn BIS_fnc_typeText; Merci beaucoup ! Ca va faire 11 heures que je suis sur cette fonction... Here is the complete working code : cutText ["", "BLACK FADED", 300]; // Black screen private ["_hoursToSkip","_minutesToSkip"]; // var declaration _hoursToSkip = _this select 0; // hours to skip _minutesToSkip= _this select 1; // minutes to skip _minutesToSkipEff = _minutesToSkip / 60 / 10; // minutes percentage skipTime (_hoursToSkip + _minutesToSkipEff); // hours to skip + minutes percentage (1.75 hours = 1hour 45mins) _msg = [[str _hoursToSkip, " HEURES ET", str _minutesToSkip, "MINUTES PLUS TARD ... ", "<t align = 'center' shadow = '1' size = '1.0'></t>"]]spawn BIS_fnc_typeText; // large sweg message waitUntil{scriptDone _msg}; // wait until the sweg message disappear cutText ["", "BLACK IN", 5]; // and then, the black screen fade away... description.ext : class CfgFunctions { class Y { class timeSkip { file = "functions"; class timeSkip {}; ext = ".sqf"; }; }; }; Line to launch it : [[19,30],"Y_fnc_timeSkip",true,true] call BIS_fnc_MP; // 19 = Hours to skip // 30 = Minutes to skip Works on multiplayer servers.
  11. // english below Ouai, effectivement, le setDate est local, du coup, pas synchro avec le serveur. Mais avec le skipTime j'ai un problème : cutText ["", "BLACK FADED", 300]; private ["_hoursToSkip","_minutesToSkip"]; _hoursToSkip = _this select 0; _minutesToSkip= _this select 1; _minutesToSkipEff = _minutesToSkip / 60 / 10; skipTime (_hoursToSkip + _minutesToSkipEff); _msg = [[" %0 HEURES ET %1 MINUTES PLUS TARD ... ", "<t align = 'center' shadow = '1' size = '1.0'></t>", _hoursToSkip, _minutesToSkip]]spawn BIS_fnc_typeText; waitUntil{scriptDone _msg}; cutText ["", "BLACK IN", 5]; Quand j'exécute la fonction avec cette commande là : [[11,30],"Y_fnc_timeSkip",true,true] call BIS_fnc_MP; J'ai une erreur en retour de typeText qui me dit que le "30" est SCALAR alors qu'il devrait être STRING, et je n'ai aucune idée de pourquoi, ni même de comment corriger ça. // Yes but I've just learned that the setDate is local, so it's not sync with the server. But with skipTime I got a problem : cutText ["", "BLACK FADED", 300]; private ["_hoursToSkip","_minutesToSkip"]; _hoursToSkip = _this select 0; _minutesToSkip= _this select 1; _minutesToSkipEff = _minutesToSkip / 60 / 10; skipTime (_hoursToSkip + _minutesToSkipEff); _msg = [[" %0 HEURES ET %1 MINUTES PLUS TARD ... ", "<t align = 'center' shadow = '1' size = '1.0'></t>", _hoursToSkip, _minutesToSkip]]spawn BIS_fnc_typeText; waitUntil{scriptDone _msg}; cutText ["", "BLACK IN", 5]; When I execute this function with this command here : [[11,30],"Y_fnc_timeSkip",true,true] call BIS_fnc_MP; I have a return error from typeText that says that the "30" is SCALAR instead of STRING, and I have no idea why and how to correct this.
  12. // english below Avec des integers, même résultat, j'ai vraiment tout essayé. J'ai écrit un nouveau code sur un autre principe (récupérer la date, la décortiquer, ajouter le temps, la "recompiler" et faire un setDate) et toujours rien, j'pige vraiment pas. Je débute dans le milieu, ça doit faire bientôt 60 heures que je travaille sur ma première mission et cette fonction m'a déjà prit 10h de taffe. C'est à dire ? private ["_hoursToSkip","_minutesToSkip"]; _hoursToSkip = 0; _minutesToSkip = 0; _hoursToSkip = _this select 0; _minutesToSkip = _this select 1; _now = 0; _year = 0; _month = 0; _day = 0; _hour = 0; _min = 0; _yearAdd = 0; _monthAdd = 0; _dayAdd = 0; _hourAdd = 0; _minAdd = 0; _now = date; _year = _now select 0; _month = _now select 1; _day = _now select 2; _hour = _now select 3; _min = _now select 4; _yearAdd = _year; _monthAdd = _month; _dayAdd = _day; _hourAdd = _hour + _hoursToSkip ; _minAdd = _min + _minutesToSkip ; while { (_minAdd >= 60) } do { _minAdd - 60 ; _hourAdd + 1 ; }; while { (_hourAdd >= 24) } do { _hourAdd - 24 ; _dayAdd + 1 ; }; while { (_dayAdd >= 30) } do { _dayAdd - 30 ; _monthAdd + 1 ; }; while { (_monthAdd >= 12) } do { _monthAdd - 12 ; _yearAdd + 1 ; }; _newDate = format ["%1", [_yearAdd, _monthAdd, _dayAdd, _hourAdd, _minAdd]]; setDate _newDate; Here is the new code Same results with integers I tried everything. I wrote an entire new code (above) with the date system, then add the "_hoursToSkip / _minutesToSkip" and a setDate but it doesn't work at all, I don't understand why. I'm a beginner in scripting, and only this function has already took me up to 10 hours of work over my 60 on my project ! Meaning ?
×