Jump to content

Recommended Posts

Hey guys!

 

Looking at getting some help with a script, wanting the fire to start with an event and after a set time or when particles 'attack' it for a given amount of time. Hopefully got it so it starts and finishes (tell me if I've fucked this part up would be a good start). Any help would be must appreciated! Cheers 😀

 

Start

CA_fnc_startFire = {

 

private["_check","_pos"];
_random = random 2;
_site = ["marker_0","marker_1","marker_2"] select _random;

 

 

_pos = getMarkerPos "marker_0";

 

_logicCenter = createCenter sideLogic;
_logicGroup = createGroup _logicCenter;
_myLogicObject = _logicGroup createUnit ["ModuleEffectsFire_F", _pos, [], 0, "NONE"];

 

_myLogicObject setVariable ["ColorRed",0.5,true];
_myLogicObject setVariable ["ColorGreen",0.5,true];
_myLogicObject setVariable ["ColorBlue",0.5,true];
_myLogicObject setVariable ["Timeout",5,true];
_myLogicObject setVariable ["ParticleLifeTime",0.6,true];
_myLogicObject setVariable ["ParticleDensity",25,true];
_myLogicObject setVariable ["ParticleSize",3,true];
_myLogicObject setVariable ["ParticleSpeed",3,true];
_myLogicObject setVariable ["EffectSize",10,true];
_myLogicObject setVariable ["ParticleOrientation",0,true];
_myLogicObject setVariable ["FireDamage",1,true];


hint "A civilian has spotted a fire at ***** and has called the fire department!";

_marker = createMarker ["YourMarker", position player ];
"YourMarker" setMarkerType "pop_bomberos_Icon";
"YourMarker" setMarkerSize [1, 1];
"YourMarker" setMarkerDir 0.93884;
"YourMarker" setMarkerText "Fire";
"YourMarker" setMarkerColor "ColorRed";
"YourMarker" setMarkerPos _pos;

 

{if (typeOf _x == "#particlesource") then {deleteVehicle _x}} forEach (_myLogicObject nearObjects 5); 
_emitters = _myLogicObject getVariable "effectEmitter";

sleep 5;
};

END

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

×