brians200 51 Posted December 22, 2013 Hello, I am working on an IED script. After the IED goes off, I would like to have billowing black smoke rising out of the area. When I create the smoke with the code below, I (the host) can see it, but nobody else on the server can. What is the proper way to get the smoke to show up for them. They can see the explosion, but not the follow up smoke. This is the smoke I can see, but the others can't. [[getPos _bomb],"CREATESMOKE",true,true] spawn BIS_fnc_MP; //Adapted from http://forums.bistudio.com/showthread.php?167728-Burning-trees-grass-houses-particleEffects/page2 CREATESMOKE = { private["_pos","_eSmoke","_time"]; _pos = _this select 0; _eSmoke = "#particlesource" createVehicle _pos; _eSmoke setParticleClass "BigDestructionSmoke"; _eSmoke setPosATL _pos; _time = 60 + random 60; sleep time; deleteVehicle _eSmoke; }; Share this post Link to post Share on other sites
zealot111 13 Posted December 22, 2013 (edited) Hello,I am working on an IED script. After the IED goes off, I would like to have billowing black smoke rising out of the area. When I create the smoke with the code below, I (the host) can see it, but nobody else on the server can. What is the proper way to get the smoke to show up for them. They can see the explosion, but not the follow up smoke. This is the smoke I can see, but the others can't. May be it is because 4 parameter of bis_fnc_mp is broken. Have you tried without it? Where are you define the CREATESMOKE function? It should be already defined on all clients when you call bis_fnc_mp. Edited December 22, 2013 by zealot111 Share this post Link to post Share on other sites
tryteyker 28 Posted December 22, 2013 Remove the last "true" from BIS_fnc_MP call. Set third parameter to "false", and define the function server-side (isServer). You need to fix sleep _time, as it is time currently. Share this post Link to post Share on other sites
brians200 51 Posted December 22, 2013 May be it is because 4 parameter of bis_fnc_mp is broken. Have you tried without it?Where are you define the CREATESMOKE function? It should be already defined on all clients when you call bis_fnc_mp. I tried switching to bis_fnc_mp, because when I just used spawn, the smoke wasn't showing up for anybody but the server (so nobody on a dedicated). I know the function is being called, because I can make it spawn smoke grenades with either approach, and other players can see them. I have a file called Ied.sqf. It creates some triggers. In the same file, I have a function called CREATEEXPLOSIONS, which then calls the next method CREATESMOKE. Remove the last "true" from BIS_fnc_MP call. Set third parameter to "false", and define the function server-side (isServer). You need to fix sleep _time, as it is time currently. This still only shows the smoke to the server, and nobody else. I have a suspicion it has something to do with the way the particle smoke is created, because if you have it create smoke grenades (commented out code), everybody can see them. [[getPos _bomb],"CREATESMOKE",false] spawn BIS_fnc_MP; //Adapted from http://forums.bistudio.com/showthread.php?167728-Burning-trees-grass-houses-particleEffects/page2 CREATESMOKE = { if(!isserver) exitwith {}; private["_pos","_eSmoke","_time"]; _pos = _this select 0; _eSmoke = "#particlesource" createVehicle _pos; _eSmoke setParticleClass "BigDestructionSmoke"; _eSmoke setPosATL _pos; _time = 60 + random 60; sleep _time; deleteVehicle _eSmoke; /*_G_40mm_SmokeGreen = "G_40mm_SmokeGreen" createVehicle (_this select 0); sleep 40; deleteVehicle _G_40mm_SmokeGreen;*/ }; Share this post Link to post Share on other sites
tryteyker 28 Posted December 22, 2013 Tried the reverse? if (isServer) exitWith. I've never used #particlesource so it might very well be a locality issue there. Share this post Link to post Share on other sites
brians200 51 Posted December 22, 2013 It doesn't work with the reverse either. Share this post Link to post Share on other sites
brians200 51 Posted December 23, 2013 Well, I have made some progress on this, but have a new problem. I can't get the smoke to stop now. _smoke = "test_EmptyObjectForSmoke" createVehicle (_this select 0); sleep 20; deleteVehicle _smoke; hint "deleted"; Even after deleteVehicle is called, it still continues to smoke. Share this post Link to post Share on other sites