Jump to content

Mr H.

Member
  • Content Count

    597
  • Joined

  • Last visited

  • Medals

Everything posted by Mr H.

  1. But this version of TFAR does it https://steamcommunity.com/sharedfiles/filedetails/?id=894678801 if you really don't want to use ACRE2. If you wan't to use only the vanilla system you'll have to script it yourself but it's not impossible.
  2. ACRE2 mod does this and I think the Beta version of TFAR does it too. If you don't want an additional mod there is this system, but it doesn't take AIs into account I think. Scripting it might be possible, detect when the player uses the push to talk key and reveal them to nearby enemies maybe?
  3. from what I see in your script your minutes are actually seconds if I'm not mistaken. Also if it can help you I made this timer script a while ago, you'll have to modify it and remove the calls to other functions but maybe it will help you: /* variable générées: publicTimerOver ==> BOOL ==> true si le timer est over */ //if (checkrun) exitWith {}; checkrun = true; //////pour que le script ne s'execute qu'une fois. //récupération des params de la fonction _publicTime = _this select 0; ////////////////////// publicTimerOver = false; while {publicTimerON && _publicTime>10} do { _publicTime = _publicTime -1; if (publicTimerPaused) exitWith {[_publicTime] call MRH_fnc_PausedTimerTime}; sleep 1; _timestamp = _publicTime/3600; _timedisplay = [_timestamp, "HH:MM:SS"] call BIS_fnc_timeToString; ["<t font = 'PuristaMedium'><t size = '1'>" + _timedisplay + "</t>",0.8,-0.05,1,0] spawn BIS_fnc_dynamicText; }; //10 dernieres secondes en rouge avec bip while {publicTimerON && _publicTime<=10 && _publicTime>= 0} do { _publicTime = _publicTime -1; sleep 1; _timestamp = _publicTime/3600; _timedisplay = [_timestamp, "HH:MM:SS"] call BIS_fnc_timeToString; ["<t font = 'PuristaMedium'><t size = '1'><t color = '#FF0000'>" + _timedisplay + "</t>",-1,-1,1,0] spawn BIS_fnc_dynamicText; playSound "biptimer"; }; checkrun = false; if (_publicTime <= 0) exitWith {publicTimerOver = true; publicVariable "publicTimerOver";};
  4. may be this will help you : https://community.bistudio.com/wiki/BIS_fnc_secondsToString
  5. Yes I have tried it in the editor and it's absolutely awesome, it's definitely something that was missing in Arma, thanks for your work!
  6. Mr H.

    Helico taxi script

    Yup mais ça se fait pas de parler en français sur un forum international, je t'ai répondu en MP. Don't worry guys the conversation in cheesemonger's latin will carry on in private.
  7. Haven't tried it yet but it looks great and adds a much needed feature. Question: does it require to be installed on the server or can it be used only client side like achilles, zec and zeccup?
  8. Mr H.

    Helico taxi script

    Yes the link to the test mission is on the mod''s page on the workshop and there is an unpboed version of the mission in the mod's directory.
  9. Also the "_x =this" in your initial parameter won't work, it will be treated as part of the string and not as a variable
  10. As you have defined it spawnsoldier_02 is the string of the class name, not the created unit
  11. Hi, so I'm trying to have multiple zeusses (zeusses? zeus?) in a mission,through the game master modules, one has #adminLogged as owner, the other a player variable name and another one has my player UID (maybe I'll add more UIDed Game Master modules in the future). Trouble is I can only use one in MP on a dedicated server, getting inside the adminLogged zeus for example will forbid the player on the zeus player slot to access the linked zeus (and even leaving the zeus and logging out won't change that). It is my understanding that this is not normal behavior and I remember reading a post with someone having the same issue on this forum but for the life of me I can't find it again. Maybe I'm doing something wrong? We had no need for multiple zeusssss before so I never really cared. It's also worth mentioning that we have a **** ton of mods activated, including ACE3. If anyone has a solution for this I'm all ears!
  12. Mr H.

    Helico taxi script

    Hey if you're still interested my mod contains a heli taxi system that is fully configurable and handled by the server: https://mrhmilsimtools-arma3-mod.wikia.com/wiki/Helicopter_taxi_system
  13. Hey guys thought I'd share it with you, it might come in handy when debugging your missions. /* Function name:MRH_fnc_drawTrigger Authors: Mr & Mrs H.(she did the maths) Description: draw triggers in game when the player goes near them, trigger is drawn in red, in green if it's been activated. Statements and other infos are displayed. Useful for debugging missions. Return value: Public: Yes Parameters: None Example(s): [] spawn MRH_fnc_drawTrigger; */ MRH_fnc_drawTrigger = { onEachFrame { _trigger = (getPos player) nearestObject "EmptyDetector"; _triggerPos = getPosATL _trigger; _x = _triggerPos select 0; _y = _triggerPos select 1; _z = _triggerPos select 2; _triggerSize = triggerArea _trigger; _xsize = _triggerSize select 0; _ysize = _triggerSize select 1; _zsize = _triggerSize select 4; _angle = _triggerSize select 2; MRH_inside_fnc_rotatePoint = { params ["_pos","_angle","_center"]; _x = _pos select 0; _y = _pos select 1; _a = _center select 0; _b = _center select 1; _xformat = _x - _a; _yformat = _y - _b; _newx = (_a + (_xformat * cos _angle)) + (_yformat* sin _angle); _newy = (_b - (_xformat * sin _angle)) + (_yformat* cos _angle); _newz = _pos select 2; [_newx,_newy,_newz] }; _isRectangle = _triggerSize select 3; _color = [1,0,0,1]; if (triggerActivated _trigger) then {_color = [0,1,0,1]}; if (_isRectangle) then { _posA = [(_x +_xsize),(_y - _ysize),_z]; _posB = [(_x +_xsize),(_y + _ysize),_z]; _posC = [(_x -_xsize),(_y + _ysize),_z]; _posD = [(_x -_xsize),(_y - _ysize),_z]; _posA = [_posA, _angle,_triggerPos] call MRH_inside_fnc_rotatePoint; _posB = [_posB, _angle,_triggerPos] call MRH_inside_fnc_rotatePoint; _posC = [_posC, _angle,_triggerPos] call MRH_inside_fnc_rotatePoint; _posD = [_posD, _angle,_triggerPos] call MRH_inside_fnc_rotatePoint; _posAd = [_posA select 0,_posA select 1,(_z+_zsize)]; _posBd = [_posB select 0,_posB select 1,(_z+_zsize)]; _posCd = [_posC select 0,_posC select 1,(_z+_zsize)]; _posDd = [_posD select 0,_posD select 1,(_z+_zsize)]; drawLine3D [_posA, _posB, _color]; drawLine3D [_posB, _posC, _color]; drawLine3D [_posC, _posD, _color]; drawLine3D [_posD, _posA, _color]; drawLine3D [_posAd, _posBd, _color]; drawLine3D [_posBd, _posCd, _color]; drawLine3D [_posCd, _posDd, _color]; drawLine3D [_posDd, _posAd, _color]; drawLine3D [_posAd, _posA, _color]; drawLine3D [_posBd, _posB, _color]; drawLine3D [_posCd, _posC, _color]; drawLine3D [_posDd, _posD, _color]; } else { if (_zsize <1) then {_zsize =100}; for "_i" from 1 to 360 do { //_distance = _ysize; _x = (_triggerPos select 0)+ _xsize*(cos _i); _y = (_triggerPos select 1) + _ysize*(sin _i); _moved = [[_x,_y,0],_angle, _triggerPos] call MRH_inside_fnc_rotatePoint; _return = [_moved select 0,_moved select 1,_z]; _return2= [_moved select 0,_moved select 1,(_z + _zsize)]; drawLine3D [_return, _return2, _color]; }; }; _triggerType = triggerType _trigger; _activation = triggerActivation _trigger; _attachedVeh= triggerAttachedVehicle _trigger; _statements = triggerStatements _trigger; _text = format ["Trigger name:%1,Class:%2,Type:%3,Activation:%4, Attached vehicle:%5, Statements%6",str _trigger,str typeof _trigger, str _triggerType, str _activation, str _attachedVeh, str _statements]; drawIcon3D ["", _color,_triggerPos, 1, 1, 45, _text, 1, 0.05, "TahomaB"]; }; };
  14. @pierremgiYes I thought about the divisor by zero issue for non area triggers but forgot to fix it, it should be fairly easy.
  15. It's a base ace3 action right? I suggest you browse their github to find the correct action name however I don't know if that's possible. Maybe use this? : https://github.com/acemod/ACE3/blob/master/addons/dragging/functions/fnc_dropObject.sqf
  16. yep @Grumpy Old Man's solution is actually way better than mine ^^ use his solution instead
  17. something like this maybe (untested): if ( "BAF_L85A2_RIS_SUSAT" in backpackItems Your_AI)then { Your_AI addMagazine "30Rnd_556x45_Stanag"; Your_AI addWeapon "BAF_L85A2_RIS_SUSAT"; Your_AI removeItemFromBackpack "BAF_L85A2_RIS_SUSAT"; }; change classes names as needed
  18. If you want the unit to surrender when a player is close I made a function that does that, players have to get close enough but in the meantime the unit stays alive and kicking, it's not exactly what you are trying to achieve but it might interest you in that situation: /* Function name:MRH_fnc_VipSurrender Author: Mr H. Description: This function makes a unit surrender when a player comes near enough. Trigger is attached to the unit so this will work even on moving units, trigger is 2 meters high, so if the unit is on the upper floor of a building players will need to reach the same height. Triggers are created globaly, therefore the code will be called globally. Unit (parameter 0) is passed to the code. Return value: None Public: Yes Parameters: 0 - <OBJECT> - Unit that will surrender 1 - <NUMBER> - Distance from the unit under which they will surrender 3 - <STRING> - Message to display when unit is captured, will be displayed in global chat, said by the unit. 4 - <CODE> -Optional code to execute, _unit is passed as a parameter, code must be stated between {} Example(s): [this,5,"I surrender!"] call MRH_fnc_VipSurrender; or [this,10,"I will never surrender!", {(_this select 0) setDamage 1; hint str _this;}] call MRH_fnc_VipSurrender; */ params ["_unit","_diameter","_message","_code"]; _diameter = _diameter /2; _trg = createTrigger ["EmptyDetector", getPosASL _unit]; if (isNil "_code") then {_code ={};}; missionNamespace setVariable ["MRH_Strigger_" + (str _trg),[_unit,_message, _code], true]; _trg setTriggerArea [_diameter, _diameter, 0, false,2]; _trg setTriggerActivation ["ANYPLAYER", "PRESENT", false]; _trg attachTo [_unit,[0,0,0]]; _trg setTriggerStatements ["this", " _data = missionNameSpace getVariable ('MRH_Strigger_' + str thisTrigger); _unit = _data select 0; _message = _data select 1; _code = _data select 2; _unit setCaptive true; _unit playMove 'ApanPknlMstpSnonWnonDnon_G03'; _unit globalChat _message; [_unit] spawn _code; " , ""];
  19. One possible solution: Store the progress in a variable attached to the trigger and make the function fetch it, handle the progress value on the server only then and broadcast it to the other machines.
  20. I remember reading somewhere that controls and displays can't be passed over the network. Maybe that's the issue? Also you might be better off putting everything in a function and remoteExec the function for players within the area.
  21. @elthefrank since you add a similar question in another spot I suggest you read this http://killzonekid.com/arma-scripting-tutorials-locality/ you will understand better what can and can't be done locally. Also here you will find the commands sorted by locality https://community.bistudio.com/wiki/Category:Commands_by_effects_and_arguments_locality
  22. what you have to check is if the command is executed only on the machine that calls the command or if it's executed on all machines. To do that just ask a pal to join you on the server and run the command in the console (by clicking on local of course) if the sounds stop for you and not for your pal it means the command has effects local to the machine and then what you want to do can be easily done, if not however it might not be possible.
  23. For SP you can just use it in a trigger and re enable on exit, for MP however it might be more complicated, it does not say on the wiki wether the effects are global or local. I'd put my money on global in which case it might not be possible but it's worth testing.
  24. @Dedmen it looks awesome! When can we expect a release?
  25. I don't know if it's exactly what you want but this worked for me on a cup building: objhouse_1 animate ["Door_1_rot", 1]; objhouse_1 animate ["Door_2_rot", 1]; objhouse_1 setVariable ["BIS_disabled_Door_2", 0, true]; objhouse_1 setVariable ["BIS_disabled_Door_1", 0, true]; It opens 2 doors on the building. Now you would have to find ou the number for the door you are trying to open.
×