Feature #30364

Apocalypse Siren on siren poles

Added by Craig_VG about 3 years ago. Updated about 3 years ago.

Status:Closed Start date:04/16/2012
Priority:Normal Due date:
Assignee:Craig_VG % Done:

100%

Category:-
Target version:1.0 Estimated time:1.00 hour
Affected ArmA II version: BIForumURL:

Description

Nice little feature adding to immersion.

Thank you Sorrow for the idea.


private ["_towersn","_pos","_towers"];
if (!isServer) exitWith {};

_pos = [0,0];
_towers = nearestObjects [_pos, ["Land_Ind_IlluminantTower"], 60000];

if (CVG_Debug == 2) then {
    _towersn = str _towers;
    player sideChat _towersn;
};

/*
This will start the playing of the sound for each siren. You can destroy the the tower to end the sound.
Sirens can be found here: http://www.armaholic.com/page.php?id=12598
Sirens by: DarkXess
*/

{
    [_x] spawn {
        _tower = _this select 0;
        private ["_x","_sirens","_Sirens"];
        _sirens = ["sirens","sirens2"];
        _Siren = _sirens call BIS_fnc_selectRandom; 
        if (cvg_debug == 2) then {
            _marker=createMarker [format ["mar%1",random 100000],getpos _tower];
            _marker setMarkerType "Dot";
            _marker setMarkerColor "ColorBlue";
            _marker setMarkerText "Air Raid Siren";
            _marker setMarkerSize [2,2];
            };
        while {alive _tower} do{
            _tower say3D _siren;
            sleep 120000;
            };
        };
} forEach _towers;

History

Updated by Craig_VG about 3 years ago

  • Description updated (diff)

Done. For any interested here is the code I used:

It only does it to Illuminant towers for now. I might expand on it.


private ["_towersn","_pos","_towers"];
if (!isServer) exitWith {};

_pos = [0,0];
_towers = nearestObjects [_pos, ["Land_Ind_IlluminantTower"], 60000];

if (CVG_Debug == 2) then {
    _towersn = str _towers;
    player sideChat _towersn;
};

/*
This will start the playing of the sound for each siren. You can destroy the the tower to end the sound.
Sirens can be found here: http://www.armaholic.com/page.php?id=12598
Sirens by: DarkXess
*/

{
    [_x] spawn {
        _tower = _this select 0;
        private ["_x","_sirens","_Sirens"];
        _sirens = ["sirens","sirens2"];
        _Siren = _sirens call BIS_fnc_selectRandom; 
        if (cvg_debug == 2) then {
            _marker=createMarker [format ["mar%1",random 100000],getpos _tower];
            _marker setMarkerType "Dot";
            _marker setMarkerColor "ColorBlue";
            _marker setMarkerText "Air Raid Siren";
            _marker setMarkerSize [2,2];
            };
        while {alive _tower} do{
            _tower say3D _siren;
            sleep 120000;
            };
        };
} forEach _towers;

Updated by Craig_VG about 3 years ago

  • Status changed from In progress to Closed
  • % Done changed from 0 to 100
  • Estimated time set to 1.00

Also available in: Atom PDF