Jump to content

swampfox87

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

Posts posted by swampfox87


  1. So the complete code Will be like this?

     

    {

      _x addAction ["<t color='#ff0000'>DESTROY: MAIN ROTOR</t>",{

           params ["_target", "_caller", "_id"];

         [_target,"HitHRotor", 1.0]  remoteExec ["BIS_fnc_setHitPointDamage",_target];

          "ROTOR DESTROYED" remoteExec ["hint",crew _target];

          _target removeAction _id

      },[],-98,false,false,"","_target == vehicle _this && alive _target"]
    } foreach (vehicles select {_x isKindOf "helicopter"});

     

    with the new modified line? and should i put this into the init of each helicopter? or debug console?

     

    By the way thanks in advance for helping me out :)


  2. Just now, pierremgi said:

    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"];

           [ ["HitHRotor", 1.0] ] remoteExec ["setHitPointDamage",_target];

          "ROTOR DESTROYED" remoteExec ["hint",crew _target];

          _target removeAction _id

      },[],-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

     

    Im new to this forum sorry for using those big words :), and i need that code permanently active in the server because we hace an academy base for trainning so the helis are parked in the spots for the pilots to use them and with the scroll they can dmg the machine on air.
    So i need the failures can be activated anytime while in helicopters, that is why i was trying to use the debug to activate when flying the helis.


  3. Hello guys, i hope you can help me with this? look i have this code for an helicopter rotor fail trainning:

     

    _vehicle = vehicle player;

    if (_vehicle isKindOf "Air") then

    {

    _vehicle addAction["<t color='#ff0000'>DESTROY: MAIN ROTOR</t>","(vehicle player) setHitPointDamage ['HitHRotor', 1.0]; hint 'ROTOR DESTROYED';",[],-98,false,false,"",''];

     

    But i want it to run on every helicopter for everyone inside so it fails for every player inside the helicopter, i tested yesterday but i only saw the dmg the copilot didnt, he was still flying as normal, but in my pc the engine was damaged and stopped, but as my friend was copilot he continued flying as normal.

     

    I was testing this into the debug console on a dedicated server in nitrado, i excecuted it as global and local, without results

     

    Thanks guys i hope u understand my description.

×