Lucky44 13 Posted September 30, 2016 How should I create a ModuleEffectsFire_F via scripting? I tried "ModuleEffectsFire_F" createVehicle getMarkerPos "marker1"; but that did nothing. Similarly, deleteVehicle doesn't work on the module. How should this be done? Share this post Link to post Share on other sites
davidoss 552 Posted September 30, 2016 _logicCenter = createCenter sideLogic; _logicGroup = createGroup _logicCenter; _myLogicObject = _logicGroup createUnit ["ModuleEffectsFire_F", [posX,posY,0], [], 0, "NONE"]; _myLogicObject setVariable ["ColorRed",0.5,true]; _myLogicObject setVariable ["ColorGreen",0.5,true]; _myLogicObject setVariable ["ColorBlue",0.5,true]; _myLogicObject setVariable ["Timeout",0,true]; // time in sec 0 for never ending _myLogicObject setVariable ["ParticleLifeTime",0.6,true]; _myLogicObject setVariable ["ParticleDensity",25,true]; _myLogicObject setVariable ["ParticleSize",1,true]; _myLogicObject setVariable ["ParticleSpeed",1,true]; _myLogicObject setVariable ["EffectSize",1,true]; _myLogicObject setVariable ["ParticleOrientation",0,true]; _myLogicObject setVariable ["FireDamage",1,true]; you can adjust the default values if needed. If not just skip setvariable part 1 Share this post Link to post Share on other sites
Lucky44 13 Posted October 1, 2016 Thanks. I didn't think createUnit would work (and didn't try it!). Any ideas about how to delete these effects modules? Share this post Link to post Share on other sites
davidoss 552 Posted October 1, 2016 _myLogicObject setVehicleVarName "myLogic"; deleteVehicle myLogic; Share this post Link to post Share on other sites
Larrow 2823 Posted October 1, 2016 Dont forget to delete the effects aswell. _myLogicObject setVehicleVarName "myLogic"; //.... //Sometime later //.... _group = group myLogic { deleteVehicle _x; }forEach [ myLogic getVariable "effectEmitter", myLogic getVariable "effectLight", myLogic ]; if ( count units _group isEqualTo 0 ) then { deleteGroup _group; }; Share this post Link to post Share on other sites
BadHabitz 235 Posted October 3, 2016 Please correct the errors here. I'd like to use this to set an object on fire for about 10 seconds as part of the code executed by line 8 of bis_fnc_holdActionAdd. Object is named 'barrel1'. Thanks. _logicCenter = createCenter sideLogic; _logicGroup = createGroup _logicCenter; _myLogicObject = _logicGroup createUnit ["ModuleEffectsFire_F", [posX,posY,0], [], 0, "NONE"]; _myLogicObject setVariable ["ColorRed",0.5,true]; _myLogicObject setVariable ["ColorGreen",0.5,true]; _myLogicObject setVariable ["ColorBlue",0.5,true]; _myLogicObject setVariable ["Timeout",10,true]; // time in sec 0 for never ending _myLogicObject setVariable ["ParticleLifeTime",0.6,true]; _myLogicObject setVariable ["ParticleDensity",25,true]; _myLogicObject setVariable ["ParticleSize",1,true]; _myLogicObject setVariable ["ParticleSpeed",1,true]; _myLogicObject setVariable ["EffectSize",1,true]; _myLogicObject setVariable ["ParticleOrientation",0,true]; _myLogicObject setVariable ["FireDamage",1,true]; _myLogicObject setVehicleVarName "myLogic"; deleteVehicle myLogic; _group = group myLogic { deleteVehicle _x; }forEach [ myLogic getVariable "effectEmitter", myLogic getVariable "effectLight", myLogic ]; if ( count units _group isEqualTo 0 ) then { deleteGroup _group; }; 1 Share this post Link to post Share on other sites
BadHabitz 235 Posted October 3, 2016 Please correct the errors here. I'd like to use this to set an object on fire for about 10 seconds as part of the code executed by line 8 of bis_fnc_holdActionAdd. Object is named 'barrel1'. If any of this code needs to be renamed for my mission I'm not sure what it is. Thanks. _logicCenter = createCenter sideLogic; _logicGroup = createGroup _logicCenter; _myLogicObject = _logicGroup createUnit ["ModuleEffectsFire_F", [posX,posY,0], [], 0, "NONE"]; _myLogicObject setVariable ["ColorRed",0.5,true]; _myLogicObject setVariable ["ColorGreen",0.5,true]; _myLogicObject setVariable ["ColorBlue",0.5,true]; _myLogicObject setVariable ["Timeout",10,true]; // time in sec 0 for never ending _myLogicObject setVariable ["ParticleLifeTime",0.6,true]; _myLogicObject setVariable ["ParticleDensity",25,true]; _myLogicObject setVariable ["ParticleSize",1,true]; _myLogicObject setVariable ["ParticleSpeed",1,true]; _myLogicObject setVariable ["EffectSize",1,true]; _myLogicObject setVariable ["ParticleOrientation",0,true]; _myLogicObject setVariable ["FireDamage",1,true]; _myLogicObject setVehicleVarName "myLogic"; deleteVehicle myLogic; _group = group myLogic { deleteVehicle _x; }forEach [ myLogic getVariable "effectEmitter", myLogic getVariable "effectLight", myLogic ]; if ( count units _group isEqualTo 0 ) then { deleteGroup _group; }; 1 Share this post Link to post Share on other sites