Announcement

Collapse
No announcement yet.

Mark Killers of Civilians

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mark Killers of Civilians


    In order to use this script put this line into the start up or init for every civilian on your mission.

    Code:
    this addEventHandler ["Killed",{_theKiller = [_this select 0,_this select 1, _this select 2]execVM "civilianKilled.sqf";}];
    Then in your civilianKilled.sqf put this:

    Code:
    _killed = _this select 0;
    _killer = _this select 1;
    _killerGunner = _this select 2;
    
    
    if (_killer in playableUnits) then
    {
        _mssg = format ["%1 killed a civilian", name _killer];
        _mssg remoteExec ["hint",0,false];
        _id = format ["killedCivId%1",_killed];
        _mrkr = createMarker [_id, getposasl _killed];
        _mrkr setMarkerShape "ICON";
        _mrkr setMarkerType "hd_warning";
        _mrkr setMarkerText _mssg;
        _mrkr setMarkerColor "colorRed";
        killedMarkers pushBack _mrkr;
        publicVariable "killedMarkers";
    } else {
        if (_killerGunner in playableUnits) then
        {
            _mssg = format ["%1 killed a civilian", name _killerGunner];
            _mssg remoteExec ["hint",0,false];
            _id = format ["killedCivId%1",_killed];
            _mrkr = createMarker [_id, getposasl _killed];
            _mrkr setMarkerShape "ICON";
            _mrkr setMarkerType "hd_warning";
            _mrkr setMarkerText _mssg;
            _mrkr setMarkerColor "colorRed";
            killedMarkers pushBack _mrkr;
            publicVariable "killedMarkers";
        };
    
    };
    By doing this an admin can clear all the makers away by using the debug and using this:
    Code:
    {deleteMarker _x}forEach killedMarkers;
    Credit: Bangabob Tutorial Vid for the format I've copied for the marks.
    Last edited by Unkl; 10-17-2016, 12:54 PM.
    |TG-189th| Unkl
    [unit][conduct][volun][command]
    TG PrimerArmA Game Officer189th Infantry Brigade Former Irregular
    Submit a Ribbon Nomination!
    "this is on par with groups you have to join to get the quality of gameplay and i really enjoyed it" - random dude
    "Remember when the threat has spotted you, smoke first then bring the explosive rounds to bear. When the threat has not spotted you its bang first and smoke after to extract." - Wicks

  • #2
    For the use the future zeus games. Theoretically, I know I can insert a line of script within an object, AI, etc.
    Would there be an single script call where I can copy & paste into the 'init' box. To show that X killed a Civilian. Instead of relying on the separate script that can't be called upon in Zeus.


    TGU Instructor Irregulars TG Pathfinder

    Former TGU Dean Former ARMA Admin Former Irregulars Officer

    "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

    Comment


    • #3
      We could probably rewrite this so that it would spawn the code right from the event handler. I'll take a look when at the home machine.

      Code:
      this addEventHandler ["Killed",{_theKiller = [_this select 0,_this select 1, _this select 2]spawn {
      
      _killer = _this select 1;
      _killerGunner = _this select 2;
      
      
      if (_killer in playableUnits) then
      {
          _mssg = format ["%1 killed a civilian", name _killer];
          _mssg remoteExec ["hint",0,false];
          _id = format ["killedCivId%1",_killed];
          _mrkr = createMarker [_id, getposasl _killed];
          _mrkr setMarkerShape "ICON";
          _mrkr setMarkerType "hd_warning";
          _mrkr setMarkerText _mssg;
          _mrkr setMarkerColor "colorRed";
          killedMarkers pushBack _mrkr;
          publicVariable "killedMarkers";
      } else {
          if (_killerGunner in playableUnits) then
          {
              _mssg = format ["%1 killed a civilian", name _killerGunner];
              _mssg remoteExec ["hint",0,false];
              _id = format ["killedCivId%1",_killed];
              _mrkr = createMarker [_id, getposasl _killed];
              _mrkr setMarkerShape "ICON";
              _mrkr setMarkerType "hd_warning";
              _mrkr setMarkerText _mssg;
              _mrkr setMarkerColor "colorRed";
              killedMarkers pushBack _mrkr;
              publicVariable "killedMarkers";
          };
      
      };
      
      };}];
      |TG-189th| Unkl
      [unit][conduct][volun][command]
      TG PrimerArmA Game Officer189th Infantry Brigade Former Irregular
      Submit a Ribbon Nomination!
      "this is on par with groups you have to join to get the quality of gameplay and i really enjoyed it" - random dude
      "Remember when the threat has spotted you, smoke first then bring the explosive rounds to bear. When the threat has not spotted you its bang first and smoke after to extract." - Wicks

      Comment

      Connect

      Collapse

      TeamSpeak 3 Server

      Collapse

      Advertisement

      Collapse

      Twitter Feed

      Collapse

      Working...
      X