Jump to content

Nag's FoV

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

Posts posted by Nag's FoV


  1. On 30/05/2017 at 5:20 PM, pierremgi said:

    If you placed a trigger on map, just name it (say myTrigger or what ever you want), then check if the marker I named _mk in the script is inArea of this variable name like this:

     

    
    _MGI_taskOnMarker = addMissionEventHandler ["map",{
      if (_this select 0) then {
        [] spawn {
          _mks = allMapMarkers;
          private ["_tgt","_tgtText","_mk"];
          while {visibleMap && hasInterface} do {
            waitUntil {!(_mks isEqualTo allMapMarkers)};
            if (count allMapMarkers > 0) then {
              _mk = allMapMarkers select (count allMapMarkers - 1);
              if (_mk inArea myTrigger) then { < do what you want > };
            };
            _mks = allMapMarkers;
          };
        };
      };
    }];

    Pierre: Yeah that's exactly what i done, as you told me to do, but the script doesn't recognize the area or the trigger variable name, I don't know why.

    So i tried what Larrow posted, and finally succeeded! Pierre's way was easier to edit the zone but this isn't a big deal.

     

    Thanks to both of you!

     

     


  2. On 26/05/2017 at 6:48 PM, pierremgi said:

    In the script, the marker _mk is the one the player just placed.

    I guess you have a trigger with an area somewhere. Name it (mytrigger for example).

    Then in the script you can check on a condition:

    if (_mk inArea mytTrigger) then  {....};

     

    NB: That works also with another marker ellipse or rectangle type. No need to be a trigger.

     

    How sould I define mytTrigger? I have an error : Undefined variable in expression: mytTrigger.

    I search on the forums but don't figured out how to define my trigger/area in the script.

     

    Thank you for your previous messages.

×