Jump to content


  • Content count

  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

1210 Excellent

About pierremgi

  • Rank
    Warrant Officer

Profile Information

Recent Profile Visitors

2642 profile views
  1. AI death win

    Probably depending on modded maps. I can imagine the case at Kunduz (CUP terrain). I didn't experienced that for ages.
  2. AI death win

    I'm using a script to avoid that. Take time to find safe position or delete the spawned stuck unit.
  3. Single fire on AI

    What for? playing Russian roulette with a P07 ?
  4. This code (my FIRST post, updated) works for all helicopters. So place it in init.sqf. Please stop copying/pasting anything, anywhere! Your code above misses the correct removeAction (remote executed). You can choose the setHitPointDamage command or the bis_fnc_setHitPointDamage function which extend the damage of the described part (here horizontal rotor) to dependable parts like vertical rotor or other parts. The command strikes one part, the function strikes this part + calculated dependable parts (see the class and sub-class hitparts of your helicopter in config viewer).
  5. It's time to "optimize" your code. The if then .... if then... cascade is never a must, checking for all cases. One day you'll have far heavier conditions to be tested, so take some good ways: replace all if... then {...} lines by: call { if... exitWith {...}; if... exitWith {...}; }; Don't forget the wrapping call {} and try to place the most frequent occurrence first. Here the order could be primaryWeapon, handGun, secondaryWeapon or even, something like: _selection = [primaryWeapon _man,handGun _man,secondaryWeapon _man] find _curw; _anim = ["firstAnim","secondAnim","thirdAnim"] select _selection; _man playMove _anim; // or what ever you script for that
  6. Modified a line to make it work on rotor. Testing.... Corrected the remove Action for all players also. As you know, some parts are dependable (see the config viewer for the Huron). You can hit the other parts with this hardcoded dependence, replacing: [_target, ["HitHRotor", 1.0] ] remoteExec ["setHitPointDamage",_target]; by: [_target,"HitHRotor", 1.0] remoteExec ["BIS_fnc_setHitPointDamage",_target]; Tested on Huron. The consequences are not the same of course. Make your choice!
  7. Welcome Don't use this ugly yelling font, prefer the code and or spoiler options in the edition bar of your text You can use some search for addAction in the search field upper right of the section you can also read the whole BIKI page about addAction and seHitPointDamage It's always better to explain where you're firing your code. For example here, you start with a local variable: _vehicle which can be forbidden in some cases (like in unscheduled scope of triggers or init fields...) Tell us also in what circumstance you want that code. At start? After some completed task?... For edited + spawned helo(s)? Well, at first step: { _x addAction ["<t color='#ff0000'>DESTROY: MAIN ROTOR</t>",{ params ["_target", "_caller", "_id"]; [_target, ["HitHRotor", 1.0] ] remoteExec ["setHitPointDamage",_target]; "ROTOR DESTROYED" remoteExec ["hint",crew _target]; [_target,_id] remoteExec ["removeAction"] },[],-98,false,false,"","_target == vehicle _this && alive _target"] } foreach (vehicles select {_x isKindOf "helicopter"}); should work if added for all clients, in init.sqf for example. Not tested EDITED
  8. [SP / MP 9] DAGUET

    Here is the R3F CUP only version. https://steamcommunity.com/sharedfiles/filedetails/?id=1541600702
  9. player works ALWAYS fine in initPlayerLocal.sqf playableUnits is an array, fine for working on your playable slots (in init.sqf for example), but... with a BAD behavior when disabling AIs in lobby (MP). If AIs are disabled, playableUnits = allPlayers. That means you can't reach the unit (it doesn't exist, neither any variable name) before a player JIP on it. So, each time you want to run something for players, if you can avoid the playableUnits, foe command, write it in initPlayerLocal.sqf with player. Simple as that.
  10. in initPlayerLocal.sqf (I can't imagine you didn't have created for your MP mission) [player, [missionNamespace, format ["start_inv_%1", name player]]] call BIS_fnc_saveInventory; in your respawn EH, where ever you write it. Let's say in init.sqf like this: addMissionEventHandler ["EntityRespawned", { _unit = _this select 0; _corpse = _this select 1; if (local _unit) then { [_unit, [missionNamespace, format ["start_inv_%1", name _unit]]] call BIS_fnc_loadInventory; removeAllWeapons _corpse; removeBackpackGlobal _corpse; removeVest _corpse; removeAllAssignedItems _corpse; removeAllItems _corpse; removeGoggles _corpse; removeHeadgear _corpse; removeAllActions _corpse; {deleteVehicle _x} forEach nearestObjects [(getPosATL _corpse),["WeaponHolderSimulated","groundWeaponHolder"],5]; }; }];
  11. It seems you forgot to set the condition of the trigger to true (instead of this) If you let this for a none,none trigger, nothing appens if you set to true (just write true), the code will always run at mission start. (almost same as if you placed it in init.sqf)
  12. Did you lock it by editor? You can always try this other code: [this, "Lockpick door", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", " call { private ['_intersects','_select_door']; _intersects = ([cursorObject, 'VIEW'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]); _select_door = if (count _intersects > 0 && {(_intersects select 0) select 0 in ['door_3','door_5']}) then [{format ['%1_sound_source', (_intersects select 0 select 0)]},{''}]; if (_this distance _target < 15 && _select_door in ['door_3_sound_source','door_5_sound_source']) then { MGI_select_door = _select_door; true } else {false}; }; true ", "true", {}, {}, {if (_target animationSourcePhase MGI_select_door == 0) then {_target animateSource [MGI_select_door,1]} else {_target animateSource [MGI_select_door, 0] }}, {}, [], 5, nil, false, false] call BIS_fnc_holdActionAdd;
  13. You can try this code in init field of bungalow: [ this, "Lockpick door", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", " call { private ['_intersects','_select_door']; _intersects = ([cursorObject, 'VIEW'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]); _select_door = if (count _intersects > 0 && {(_intersects select 0) select 0 in ['door_3','door_5']}) then [{format ['bis_disabled_%1', (_intersects select 0 select 0)]},{''}]; if (_this distance _target < 15 && _select_door in ['bis_disabled_door_3','bis_disabled_door_5']) then { MGI_select_door = _select_door; true } else {false}; }; true", "true", {}, {}, { if (_target getVariable [MGI_select_door,1] !=0) then { _target setVariable[MGI_select_door,0,true] } else { _target setVariable[MGI_select_door,1,true] } }, {}, [], 5, nil, false, false ] call BIS_fnc_holdActionAdd;