ACE3/addons/zeus/functions/fnc_bi_moduleMine.sqf
mharis001 bca8b01860 Various additions to ace_zeus (#6036)
* Add search to teleport players UI

* Change group side icons to look better

* Improve teleport UI and add stringtable entries

* Add Assign Repair Vehicle module

* Add Assign Repair Facility module

* Add Assign Engineer module

* Add Full Heal module

* Add Suicide Bomber module

* Make heal module work without ace_medical

* Add suicide bomber module translations

* Improve attribute cargo to use displayName

* Improve set engineer ui

* ACE_Curator for repair modules + author array

* Add angle param to getModuleDestination

* Prevent multiple suicide bomber modules on same target

* Heal module: support BI scripted revive system

* Requested changes
2018-02-24 11:44:57 -06:00

51 lines
1.6 KiB
Plaintext

/*
* Author: Bohemia Interactive
* Module function for spawning mines
* Edited to remove forced map markers and mines being revealed to players
*
* Arguments:
* 0: The module logic <LOGIC>
* 1: units <ARRAY>
* 2: activated <BOOL>
*
* Return Value:
* None
*
* Example:
* [LOGIC, [bob, kevin], true] call ace_zeus_fnc_bi_moduleMine
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_units", "_activated"];
if (_activated) then {
_explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive");
if (_explosive != "") then {
_explosive = createvehicle [_explosive,position _logic,[],0,"none"];
_explosive attachto [_logic];
// Added by ace_zeus to control if mines are revealed
if (GVAR(revealMines) > 0) then {
//--- Reveal the mine to curator's side
{
_side = (getassignedcuratorunit _x) call bis_fnc_objectSide;
_side revealmine _explosive;
} forEach (objectcurators _logic);
if (GVAR(revealMines) > 1) then {
//--- Mark minefields in the map
[] spawn bis_fnc_drawMinefields;
};
};
//--- Show hint to curator who placed the object
[[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp;
waituntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic};
if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;};
deletevehicle _logic;
};
};