HogRoot 0 Posted April 24, 2008 I am trying to place smoke plumes inside of the smoke stacks to give them the appearance to operation/occupation. This is going to be vital to my mission. I am using this code: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _OBJ = "logic" createvehicle getpos burn; _ #Fire _PS1 = "#particlesource" createVehicleLocal getpos _OBJ _PS1 setParticleCircle [0, [0, 0, 0]]; _PS1 setParticleRandom [0.2, [1, 1, 0], [0.5, 0.5, 0], 1, 0.5, [0, 0, 0, 0], 0, 0]; _PS1 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 2, 6], "", "Billboard", 1, 1, [0, 0, 0], [0, 0, 0.5], 1, 1, 0.9, 0.3, [1.5], [[1, 0.7, 0.7, 0.5]], [1], 0, 0, "", "", _obj]; _PS1 setDropInterval 0.03; #Smoke Part 1 _PS2 = "#particlesource" createVehicleLocal getpos _OBJ _PS2 setParticleCircle [0, [0, 0, 0]]; _PS2 setParticleRandom [0, [0, 0, 0], [0.33, 0.33, 0], 0, 0.25, [0.05, 0.05, 0.05, 0.05], 0, 0]; _PS2 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 0, 1], "", "Billboard", 1, 10, [0, 0, 0.5], [0, 0, 2.9], 1, 1.275, 1, 0.066, [4, 5, 10, 10], [[0.3, 0.3, 0.3, 0.33], [0.4, 0.4, 0.4, 0.33], [0.2, 0.2, 0, 0]], [0, 1], 1, 0, "", "", _obj]; _PS2 setDropInterval 0.5; #Smoke Part 2 _PS3 = "#particlesource" createVehicleLocal getpos _OBJ _PS3 setParticleCircle [0, [0, 0, 0]]; _PS3 setParticleRandom [0, [0, 0, 0], [0.5, 0.5, 0], 0, 0.25, [0.05, 0.05, 0.05, 0.05], 0, 0]; _PS3 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 3, 1], "", "Billboard", 1, 15, [0, 0, 0.5], [0, 0, 2.9], 1, 1.275, 1, 0.066, [4, 5, 10, 10], [[0.1, 0.1, 0.1, 0.75], [0.4, 0.4, 0.4, 0.5], [1, 1, 1, 0.2]], [0], 1, 0, "", "", _obj]; _PS3 setDropInterval 0.25; #end exit It works perfectly...the only problem I have is when I try to place it over a smoke stack or electrical plant silos the fire and smoke always winds up beside the item and not on it or in it. But I need it to spawn right in the center and close to the top of the stack. Also if anyone can show me how to attach the script to an object...say a backpack "AAMI282"...I would appreciate it. Thanks Share this post Link to post Share on other sites
UNN 0 Posted April 24, 2008 Quote[/b] ]It works perfectly...the only problem I have is when I try to place it over a smoke stack or electrical plant silos the fire and smoke always winds up beside the item and not on it or in it. But I need it to spawn right in the center and close to the top of the stack. You could try replacing this line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_PS1 = "#particlesource" createVehicleLocal getpos _OBJ With these lines: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_PS1 = "#particlesource" createVehicleLocal getpos _OBJ _PS1 setPos (getpos _OBJ) Sometimes Arma automatically tries to positions objects so they don't collide. So you might have to reinforce the act. But _OBJ probably has to have it’s centre of gravity at the position you want. If it’s a smoke stack with a geometry LOD, then it’s a safe guess to say it doesn’t. If it doesn’t, then you could always adjust it with the modelToWorld command. Share this post Link to post Share on other sites
=Odin= 0 Posted April 25, 2008 G'day I had this problem aswell and to fix it I added this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OBJ = "logic" createvehicle getpos burn; _OBJ setpos [Getpos burn select 0,(Getpos burn select 1), 2] The 2 representing meter's above ground, I have not tried to do this on anything as high as a smoke stack so it may take a bit of fiddling to get the correct height Share this post Link to post Share on other sites
HogRoot 0 Posted April 25, 2008 Thanks guys...I will give it a try tonight. Share this post Link to post Share on other sites
HogRoot 0 Posted April 25, 2008 @Odin....THANK YOU!!! It worked perfectly!!! Share this post Link to post Share on other sites
Wingnut Master 0 Posted June 7, 2008 one small question, sry to bring this up, but how can i make it to where i can use this on multiple objects instead of one, b/c it has to be called burn? Share this post Link to post Share on other sites
=Odin= 0 Posted June 7, 2008 G'day, Change the 1st line to <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OBJ = "logic" createvehicle getpos _this; create your Logics and add to their init <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this exec "fire.sqs" That should work Share this post Link to post Share on other sites