Harun AKCAY 1 Posted September 4, 2022 Hello We frequently hold air shows for players on an Invade & Annex server. In order to further enhance these performances and add visuality to the event, we want a smoke that we can turn on and off at any time. We should be able to change the smoke colors and size with codes. We want these fumes to work well on the A-143 Buzzard and F/A-181 Black Wasp II. Is there anyone who can help with this? Share this post Link to post Share on other sites
Larrow 2822 Posted September 4, 2022 https://forums.bohemia.net/forums/topic/191729-need-help-with-addaction/?do=findComment&comment=3046000 Share this post Link to post Share on other sites
Harun AKCAY 1 Posted September 5, 2022 12 hours ago, Larrow said: https://forums.bohemia.net/forums/topic/191729-need-help-with-addaction/?do=findComment&comment=3046000 Thanks for your answer. I don't have enough scripting knowledge so I want to make sure. (I don't always get a chance to try.) Would it be enough for me to add the "SpawnSmoke.sqf" file to the server task files and write the codes in it? Also does it work properly on Blackwasp and Buzzard? [Is there a way for me to test these easily via the "Eden Editor"? I want to learn. Because when we make changes to the server task file, I have to pay to hide the codes again.] 1 Share this post Link to post Share on other sites
Larrow 2822 Posted September 8, 2022 On 9/5/2022 at 4:24 AM, Harun AKCAY said: Would it be enough for me to add the "SpawnSmoke.sqf" file to the server task files and write the codes in it? Sorry I do not know what you mean by "server task files". Although yes you could add the code given to a file and then exec the file for each vehicle that needs the action. Remember an action is local, so it would need calling( or remoteExec ) on each client that needs access to the action. ie quoted answer from the linked thread where someone asks a similar question. Quote Or change plane for _this. Put it in a planeTrails.sqf. Then in each planes init.. nul = this execvm "planeTrails.sqf" On 9/5/2022 at 4:24 AM, Harun AKCAY said: Also does it work properly on Blackwasp and Buzzard? It should work on any vehicle provided. All you need to adjust is offset positions for emitter spawns and smoke color to your liking. }forEach [ //[ smoke color[RGB], offset position[x,y,z] ] [ [ 1, 0, 0 ], [-4, 0, 0] ], [ [ 1, 0, 0 ], [4, 0, 0] ], [ [ 0, 0, 1 ], [-5, 0, 0] ], [ [ 0, 0, 1 ], [5, 0, 0] ] ]; On 9/5/2022 at 4:24 AM, Harun AKCAY said: Is there a way for me to test these easily via the "Eden Editor"? Yes, just paste the code given into a vehicle's init and change plane for this. ie this addAction [ "Release Smoke Trails", { Share this post Link to post Share on other sites
Harun AKCAY 1 Posted September 8, 2022 6 hours ago, Larrow said: Yes, just paste the code given into a vehicle's init and change plane for this. ie Thank you very much for taking the time to answer 🙂 I will test it and get back to you as soon as possible. Have a nice day. Share this post Link to post Share on other sites
Harun AKCAY 1 Posted September 8, 2022 I got the code I need. I am able to set the color of both wings with the "SmokeShellBlue" expressions. I can open and close the menu at any time with the middle mouse button. You should put the jet you want to use on the server as "Class Name" (Check here) in the code. For example A-143 Buzzard = I_Plane_Fighter_03_CAS_F Just paste the code given into a vehicle's init. There is only one thing I want to set right now. The smoke left behind stays for a very long time. Any chance of adjusting the disappearance time of this smoke? life_smokeTrail = false; life_smokes = []; life_actions pushBack (player addAction["<t color='#00FF00'>Smoke On</t>", { life_smokeTrail = true; { private _colour = ["SmokeShellBlue", "SmokeShell"] select _forEachIndex; for "_i" from 0 to 5 do { private _veh = objectParent player; private _smoke = _colour createVehicle [random(50),random(50),random(50)]; _smoke attachTo [_veh, _x]; life_smokes pushBack _smoke; }; } forEach [[-5,0.855469,-0.6],[5,0.855469,-0.6]]; },"",0,false,false,"",'!life_smokeTrail && {!isNull objectParent player} && {(objectParent player isKindOf "I_Plane_Fighter_03_CAS_F") || (objectParent player isKindOf "I_Plane_Fighter_03_CAS_F") || (objectParent player isKindOf "I_Plane_Fighter_03_CAS_F")}']); life_actions pushBack (player addAction["<t color='#00FF00'>Smoke Of</t>", { life_smokeTrail = false; { if !(isNull _x) then { deleteVehicle _x; }; } forEach life_smokes; },"",0,false,false,"",'life_smokeTrail']); Share this post Link to post Share on other sites
Larrow 2822 Posted September 9, 2022 6 hours ago, Harun AKCAY said: The smoke left behind stays for a very long time. Any chance of adjusting the disappearance time of this smoke? Yes, If you actually use my code from that thread rather than @kylania's (which relies on smoke shells) you can set whatever you like as they are particle emitters. Quote _colorAlpha = 0.5; _timeout = 0; _particleLifeTime = 50; _particleDensity = 10; _particleSize = 1; _particleSpeed = 1; _particleLifting = 1; _windEffect = 1; _effectSize = 1; _expansion = 1; Share this post Link to post Share on other sites