Catriix 2 Posted September 21, 2017 Hello everybody, Today I am requesting your assistance to help me put out the fire made with the ModuleEffectsFire_F module. Here is my code : fn_fire.sqf 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 "Un feu s´est déclenché!"; _marker = createMarker ["YourMarker", position player ]; "YourMarker" setMarkerType "pop_bomberos_Icon"; "YourMarker" setMarkerSize [1, 1]; "YourMarker" setMarkerDir 0.93884; "YourMarker" setMarkerText "Incendie"; "YourMarker" setMarkerColor "ColorRed"; "YourMarker" setMarkerPos _pos; sleep 5; // missing code here :| }; So basically what I want is : Start a fire with an event, and then make an event end it when this happens. I don´t want the effect to stop after a given period of time, but after someone uses a fire extinguisher (I will sort out how to do this). For now I just neec your advice how to put this fire out. Thank you guys! P.S : I´m not english so please excuse my english level. :) Share this post Link to post Share on other sites
Catriix 2 Posted September 22, 2017 Found it myself, just had to add : {if (typeOf _x == "#particlesource") then {deleteVehicle _x}} forEach (_myLogicObject nearObjects 5); deleteVehicle _myLogicObject; 2 Share this post Link to post Share on other sites
7erra 629 Posted September 24, 2017 Another option would be to return the created emitters via the variable on the logic: _emitters = _myLogicObject getVariable "effectEmitter"; This returns an array of emitters in case there was another one created. Then you can delete it with your forEach command. This option might be more elegant since you can precisely delete only emitters that were created with the module. If there is another emitter nearby then your function would delete those as well. 1 Share this post Link to post Share on other sites
Larrow 2822 Posted September 24, 2017 2 hours ago, 7erra said: Another option would be to return the created emitters via the variable on the logic: _emitters = _myLogicObject getVariable "effectEmitter"; This returns an array of emitters in case there was another one created. Also "effectLight" for any lights the effect may include(like fire does). typeOf _x == "#particlesource" will not catch lights they are of type "#lightpoint". As @7erra says use the variables stored on the module to get all particle and light sources it has created. 1 Share this post Link to post Share on other sites