Jump to content
Sign in to follow this  
ravsun

Request: Red Smoke on EI in Area.

Recommended Posts

Hello.

I am looking for an Addaction that would red smoke Enemy infantry in a 500km area.

CLOSE AIR SUPPORT (Day 2) Has it on radio command. I looked into the script for it.

I just don't know enough to implement it in my mission.

Any help would be Great.

Thanks

Ravsun

Share this post


Link to post
Share on other sites

So...

I can make the smoke but cant get it to drop in areas with EI in it.

I dont want to make variables for each unit... So can the script just look for opfor?

Any help would be great..

thanks

Share this post


Link to post
Share on other sites

what is u grouped the units and name their groups then u can do something like this

_NMEgrp = createMarker ["nmegrpmkr", getPosASL "put groupname here"];
_smoke = "SmokeShellRed" createVehicle (getMarkerPos "nmegrpmkr");

and then if u have many groups you can do this

_NMEgrp = createMarker ["nmegrpmkr", getPosASL "put groupname here"];
_NMEgrp1 = createMarker ["nmegrpmkr1", getPosASL "put groupname here"];
_NMEgrp2 = createMarker ["nmegrpmkr2", getPosASL "put groupname here"];

_smoke = "SmokeShellPurple" createVehicle (getMarkerPos [_NMEgrp,_NMEgrp1,_NMEgrp2]);

Share this post


Link to post
Share on other sites

I tryed activating that script with add action and a trigger.. does not work.

On init of A164

this addAction ["Mark Targets", "smoke.sqf"]

Script:

_NMEgrp = createMarker ["nmegrpmkr", getPosASL "EI1"];

_smoke = "SmokeShellRed" createVehicle (getMarkerPos "nmegrpmkr");

Enemy group leader init:

EI1 = group this;

doesent work..

thanks

Edited by ravsun

Share this post


Link to post
Share on other sites

Tested.

smoke.sqf:

//this addAction ["Mark Targets", "smoke.sqf"]

private ["_nearestEnemies","_unit","_player","_pos","_nearestUnits","_tgt","_smoke","_index"];

_player = _this select 0;
_pos = getPos _player;

_nearestUnits = nearestObjects [_pos,["Man"],500];
_nearestEnemies = [];

if(EAST countSide _nearestUnits > 0) then{
  {
     _unit = _x;
     if(side _unit == EAST) then{_nearestEnemies = _nearestEnemies + [_unit]};
  } foreach _nearestUnits;

_index = (random (count _nearestEnemies));
_tgt = _nearestEnemies select _index;
_smoke = "SmokeShellRed" createVehicle (getPos _tgt);
};

The script creates an array of all relevant units then selects one at random to mark with smoke.

Where _nearestUnits is defined, you can add other vehicle types to look for and change the search radius (500 meters seems a little narrow for CAS).

_nearestUnits = nearestObjects [_pos,["Man","Car","Tank"],3000];

Edited by Harzach

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×