Jump to content

Cysiu

Member
  • Content Count

    21
  • Joined

  • Last visited

  • Medals

Posts posted by Cysiu


  1. GVAR(confirmedKills) = 0;
    
    addMissionEventHandler ["EntityKilled", {
        params ["_unit"];
    
        if !(_unit isKindOf "CAManBase") exitWith {};
        private _side = side (group _unit);
    
        if (_side isEqualTo civilian) then {
          GVAR(confirmedKills) = GVAR(confirmedKills) + 1;
        };
      }];

    In my case GVAR(confirmedKills) expands to Krzyc_confirmedKills, so it's possible to use it somewhere else.


  2. serverside:

    Quote

     

    addMissionEventHandler ["EntityKilled", {

        params ["_unit"];

     

        if !(_unit isKindOf "CAManBase") exitWith {};

        private _side = side (group _unit);

     

        if (_side isEqualTo civilian) then {

          hint "A civilian has been killed! Be more careful Marines!";

        };

      }];

     

     

    • Like 2

  3. 23 minutes ago, zagor64bz said:

    Sorry for "pirating" this post and taking advantage of your knowledge... I have more or less about 20 holdActions/addActions in one of my WIP mission (SP/Tanoa); should I be worried and convert them to the "trigger-solution" you suggested?

    Thank you.

    Arma Wiki:

    Quote

    If action is added to an object (and not to player) condition will only get evaluated IF player is closer than ~50m to the object surface AND is looking at the object.

    So doing it trigger way is needless.

    • Like 1

  4. 3 hours ago, miguel_roman_96@hotmail.com said:

    Ok, the problem is that the functions that are used to move the markers are argument global and effects global. And as far as I read in the wiki (the local markers page) it says this:

     

    "Local markers have own set of local commands "xxmarkerxxLocal" to work with. If you use global marker command on a local marker, the local marker will become global marker."

     

    my question is: Is BIS_fnc_cancelMarker (an example of the multiple functions) considered a global marker command? Does it change the local markers to global? If yes, how can I make it to stay in local (the markers)? Is it something related to remoteExec a solution?

     

    My next idea was to use something similar in the movements of markers: 

     

    ["nato1",(getMarkerPos "avance1"),4] remoteExec ["call BIS_fnc_moveMarker", -2, JIP];

     

    But idk if it is gonna work. Anyway, thank you all for the help.

    I would open BIS_fnc_cancelMarker in function viewer and make my own version, that make use of local commands.

    • Like 1
×