Jump to content
Sign in to follow this  
scajolly

Billowing smoke, permanent

Recommended Posts

Hello!

I need to find a way to make a crater and a wreck in it be EITHER on fire AND have black smoke come from it, OR just the smoke part. Can anyone help me with this?

The smoke should be of the kind that you see when tyres are lit on fire. It really needs to signal unrest and chaos from afar, so preferably 30-60 ft high. :)

Any help sincerely appreciated!!

(something along the lines of this, but slightly scaled down...

533_Smoke.jpg)

Share this post


Link to post
Share on other sites

Better version of this script on page three.

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");
[sD_smokePot, [0.1,0.1,0.1]] spawn {
_sh=_this select 0;
_col=_this select 1;
_c1=_col select 0;
_c2=_col select 1;
_c3=_col select 2;

sleep (3+random 1);

_source = "#particlesource" createVehicleLocal getpos _sh;
_source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh];
_source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
_source setDropInterval 0.03;
_source2 = "#particlesource" createVehicleLocal getpos _sh;
_source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh];
_source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360];
_source2 setDropInterval 0.03;
};

Edited by kylania

Share this post


Link to post
Share on other sites

Thank you, Kylania! If you don't mind my stupidity, I've not scripted since OFP. Which are the variables here that I must fix in a trigger-init?

If I'm not wrong (which I am), I've included this in a .sqf, and I assume the correct form would be

THIS [sh,col,c1,c2,c3] exec "scripts\billowing.sqf

Tied to a trigger for initializing. What particular variables are these? I can't identify them at a glance.

Share this post


Link to post
Share on other sites

If I may answer, he made this one real easy so you don't have to worry about the parameters. If you put that code into 'billowing.sqf' then you can call it from wherever like this:

_handle = []execVM "scripts\billowing.sqf";

The _handle can be named whatever you want, just make sure to put the _ underscore if used in a trigger to make it local. Also, since you mentioned OFP thought I would mention that SQF scripts are called with execVM, as exec only works on SQS.

Share this post


Link to post
Share on other sites
If I may answer, he made this one real easy so you don't have to worry about the parameters. If you put that code into 'billowing.sqf' then you can call it from wherever like this:

_handle = []execVM "scripts\billowing.sqf";

The _handle can be named whatever you want, just make sure to put the _ underscore if used in a trigger to make it local. Also, since you mentioned OFP thought I would mention that SQF scripts are called with execVM, as exec only works on SQS.

Ah, most fantastic. I just received help with the script, so this should become second nature again relatively soon.

My problem: The smoke is perfect, but not quite billowing. It needs to be far greater in volume. If ACE randomises wind direction, I can't place these objects in the air to produce a tall plume. If there was a way to direct the wind and its force, I'd be in heaven.

Share this post


Link to post
Share on other sites

You can mess with the values in those super long strings to get more smoke. In my tests though it was either too little or WAY to much and glitchy, but play around with the numbers. :)

Share this post


Link to post
Share on other sites

So I "borrowed" this to make a crashed chopper by changing "Misc_TyreHeapEP1" to "UH1H_TK_EP1" but now I want to set its damage to 1 but

SD_smokePot setDamage 1

does nothing and halts the script. Can someone clue my uselessness into the proper syntax for destroying a vehicle I have created in the same script?

Thanks!

RR

Share this post


Link to post
Share on other sites

I tried what you did and it worked for me. Make sure you have a semilcolon ; at the end, this is an SQF script ;)

Share this post


Link to post
Share on other sites
I tried what you did and it worked for me. Make sure you have a semilcolon ; at the end, this is an SQF script ;)

Wow. It's always nice to be reassured that on one hand you are not as dumb as you thought you were and yet, on the other hand, you were far dumber! :icon_redface: I managed to get the semicolon after the line in question but somehow erased the one on the line before! Thanks for the doublecheck AZ! If anyone wants a crashed helicopter, Kylania's smoke example looks really cool with it. Just remember the semicolon.

RR

Share this post


Link to post
Share on other sites

I'm currently using a slightly modified script. I've identified some numbers' effect, but not all!

For instance, I wonder at this string:

_source = "#particlesource" createVehicleLocal getpos _sh;
_source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [b][0.7, 0.6, 0.9][/b], 0, 1.277, 1, 0.025, [b][u][0.2, 4, 7][/u][/b], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh];

I found bold to have to do with motion and speed, while bold with underscore had more to do with thickness of smoke. Above are some of my own numbers, mind. I've been able to make the smoke quite nice so far, but it still lingers far below 20ft.

The goal was a plume of smoke, rising in direction of the wind, thick and alarming. HEIGHT is more an issue than thickness, actually...

A natural solution would be to change the markerpos with another pos, say a getpos +height; move the smoke originator upwards and to the side, to raise the cloud of smoke before it would appear to dissipate too much. This approach is thwarted by ACE's wind direction. I hear it shifts randomly, but have not observed it. I want to be ahead of the problem, though...

Does this mark the end of smoke plumes in Arma2?

Share this post


Link to post
Share on other sites

There is indeed a way to affect ArmA2's wind: setWind command.

Although my own smoke doesn't billow in an animated fashion, it did used to in the ArmA1 version, and I still have the animation matrix for that. I may put it back in to the addon for peeps to use, I left it out this time around just to save on resources and retain a more consistent look.

Share this post


Link to post
Share on other sites

I am such a tool! I only now realized it's the same array as for ParticleArray!

http://community.bistudio.com/wiki/ParticleArray

[shapeName, AnimationName, Type, TimerPeriod, LifeTime, Position, MoveVelocity, RotationVelocity, Weight, Volume, Rubbing, Size, Color, AnimationPhase, RandomDirectionPeriod, RandomDirectionIntensity, OnTimer, BeforeDestroy, Object]

Because this is a rather intensive array (19 items), I think I will map them out to the best of my understanding here. Hopefully someone can ! my ?s in the spoiler list. If I come up with a way to make the smoke go high, I'll post it here...

_source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], --------- Shapename (what are the figures in the array?)

"", --------- AnimationName - there is none?

"Billboard", --------- Type - I haven't the faintest what billboard is.

1, --------- TimerPeriod

20, --------- LifeTime

[0, 0, 0], --------- Position

[0.7, 0.6, 0.9], --------- MoveVelocity

0, --------- RotationVelocity

1.277, --------- Weight

1, --------- Volume

0.025, --------- Rubbing (rubbing???)

[0.2, 4, 7], ---------Size

[[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], --------- Colour

[1.5,0.5], --------- AnimationPhase

1, --------- RandomDirectionPeriod

0.04, --------- RandomDirectionIntensity

"", --------- OnTimer

"", --------- BeforeDestroy

_sh] --------- Object

;

THANK you, Dmark, this is perfect. I wish they would've incorporated it with Direction and made it a 360-system instead, but these coordinates should provide me with what I need - so long as ACE does not see fit to overrule it.

Edited by SCAJolly

Share this post


Link to post
Share on other sites
I am such a tool! I only now realized it's the same array as for ParticleArray!

http://community.bistudio.com/wiki/ParticleArray

[shapeName, AnimationName, Type, TimerPeriod, LifeTime, Position, MoveVelocity, RotationVelocity, Weight, Volume, Rubbing, Size, Color, AnimationPhase, RandomDirectionPeriod, RandomDirectionIntensity, OnTimer, BeforeDestroy, Object]

THANK you, Dmark, this is perfect. I wish they would've incorporated it with Direction and made it a 360-system instead, but these coordinates should provide me with what I need - so long as ACE does not see fit to overrule it.

You could always set up your own loop to overwrite ACE2's wind setting :) either keep updating the wind with your own settings, or track the settings and when they change outside some parameter then change it back.

Share this post


Link to post
Share on other sites
You could always set up your own loop to overwrite ACE2's wind setting :) either keep updating the wind with your own settings, or track the settings and when they change outside some parameter then change it back.

(I edited my post since you posted)¨

Yes, I thought of saying that I could create a script that looped a setwind command, but thought it somewhat redundant prior to investigating ACE's wind direction, which I will try to do tonight.

Share this post


Link to post
Share on other sites

I am very new to this scripting but learning fast.

Please, can you be more "Newb" friendly in the language used here..lol

I have made a sqf file named billowing.sqf, and pasted this code below in it.

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");
[sD_smokePot, [0.1,0.1,0.1]] spawn {
_sh=_this select 0;
_col=_this select 1;
_c1=_col select 0;
_c2=_col select 1;
_c3=_col select 2;

sleep (3+random 1);

_source = "#particlesource" createVehicleLocal getpos _sh;
_source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh];
_source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
_source setDropInterval 0.03;
_source2 = "#particlesource" createVehicleLocal getpos _sh;
_source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh];
_source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360];
_source2 setDropInterval 0.03;
};

Now, what do I do next? I have this code that I think goes into the init.sqf file:

_handle = []execVM "scripts\billowing.sqf";

then i change the _handle to what ever name I want and then name the object(in this case a tire heap) to be "smoking" the new name.

not sure here...

Share this post


Link to post
Share on other sites

Hello, McSpuds! I wouldn't know anything about the init.sqf yet, that's new to me since OFP. Until anything else, I simply resort to OnActivation (initialization)-fields in triggers and similar.

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");

This line is correct if you have a marker called "smokepoint" only.

Also,

"scripts\billowing.sqf";

is correct only if you have a folder in the mission folder called "scripts", wherein you put the sqf.

If you look in the spoiler list I made two replies ago, you'll find there is a "Size" and a "MoveVelocity". These are the easiest to change on your own. Increase the values in "Size" (like [0.8,6,9]) and you will get a thicker, more down to earth smoke. Increase the values in MoveVelocity correspondingly (perhaps [0.3,0.6,0.9]) and the smoke will move more... 'proportionately', to its new Size. I will experiment more with the array later, but this is what I can tell you right off the bat...

Other than that you're good to go.

Edited by SCAJolly

Share this post


Link to post
Share on other sites

Sorry for asking agian. I still do not have this right yet. I am still having trouble getting it to work.

I have the script folder and sqf file done in the mission file.

What is not clear is what to do with

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");

what is the marker for?

Do i put what where?

If I have a tyre heap on the ground named "tire1" do I add this to the init?

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");

or does this go into a trigger and then what is the activation.....?

I just do not understand what goes in what because there are different people saying different things here and I am now confused because we have added a "marker" as well.

Share this post


Link to post
Share on other sites
All (or at least most) of your particle array parameters are explained here.

I like the part where I link that page without scrolling down.

:bored:

---------- Post added at 03:15 PM ---------- Previous post was at 03:13 PM ----------

Sorry for asking agian. I still do not have this right yet. I am still having trouble getting it to work.

I have the script folder and sqf file done in the mission file.

What is not clear is what to do with

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");

what is the marker for?

Do i put what where?

If I have a tyre heap on the ground named "tire1" do I add this to the init?

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");

or does this go into a trigger and then what is the activation.....?

I just do not understand what goes in what because there are different people saying different things here and I am now confused because we have added a "marker" as well.

Just place a marker, and the marker will be the place where the script creates a tyre heap for you. The script does everything except determine where to be. Where I've written "SMOKEPOINT" in the sqf is where the name of the Marker (F6) goes in the mission editor.

Share this post


Link to post
Share on other sites

I must be doing something wrong.

1. I have a folder in my mission folder named \scripts with the billowing.sqf in it. the sqf reads:

SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint");
[sD_smokePot, [0.1,0.1,0.1]] spawn {
_sh=_this select 0;
_col=_this select 1;
_c1=_col select 0;
_c2=_col select 1;
_c3=_col select 2;

sleep (3+random 1);

_source = "#particlesource" createVehicleLocal getpos _sh;
_source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh];
_source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
_source setDropInterval 0.03;
_source2 = "#particlesource" createVehicleLocal getpos _sh;
_source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh];
_source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360];
_source2 setDropInterval 0.03;
};

2. I created a marker in editor named "smokepoint"

what else is needed because there is no tire pile or smoke...

should ther not be a execVM someplace?

---------- Post added at 11:34 AM ---------- Previous post was at 11:29 AM ----------

I added

execVM "scripts\billowing.sqf";

to my init.sqf and woot we have smoke.

Thanks

Share this post


Link to post
Share on other sites

should ther not be a execVM someplace?

Haha yes mate! There should indeed. I thought you had one in the init.sqf already?

In any case, create a trigger with either 5000x5000 width and Anybody filter, or tie it to some other event (radio, opfor no longer present, etc).

In the On Activation of the trigger, place

this execVM "scripts\billowing.sqf";

Edited by SCAJolly

Share this post


Link to post
Share on other sites

Here's a more adaptable version of the script. You can feed it either an object, a marker name or a specific location array (getPos or just [1,1,1]) and it'll create the smoke at the location of either. You can also optionally give it a custom smoke color.

Dark gray smoke at the player's feet

nul = [player] execVM "createSmoke.sqf";

Red smoke at marker "smoke"

nul = ["smoke", [1,0,0]] execVM "createSmoke.sqf";

Yellow smoke 10m in the air outside the Mosque in Zargabad

nul = [[4180, 4156, 10], [1, 1, .5]] execVM "createSmoke.sqf";

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: kylania
//////////////////////////////////////////////////////////////////
//
// nul = [someObject] execVM "createSmoke.sqf";
//
// nul = ["someMarkerName", [1,0,0]] execVM "createSmoke.sqf";
//////////////////////////////////////////////////////////////////

private ["_loc","_color","_smoker"];

_loc = _this select 0; // Can be an object or a string (marker name) or a position array.
_color = if (count _this > 1) then {_this select 1} else {[0.1,0.1,0.1]};  // default smoke color is dark grey

// Grab the type of location, either a string (therefore a marker) or an object (therefore, well, an object)
switch (toUpper(typeName _loc)) do {
case "STRING": {_smoker = getMarkerPos _loc};	
case "OBJECT": {_smoker = getPos _loc};
case "ARRAY": {_smoker = _loc};	
default {_smoker = getPos player};  // hopefully shouldn't get here, but just in case!
};

// Spawn the smoke at the location.
[_smoker, _color] spawn {
_sh=_this select 0;
_col=_this select 1;
_c1=_col select 0;
_c2=_col select 1;
_c3=_col select 2;

sleep (3+random 1);

_source = "#particlesource" createVehicleLocal _sh;
_source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh];
_source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
_source setDropInterval 0.03;
_source2 = "#particlesource" createVehicleLocal _sh;
_source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh];
_source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360];
_source2 setDropInterval 0.03;
};

Share this post


Link to post
Share on other sites

Hey i what do i have to change to make the smoke rise higher into the sky?

Share this post


Link to post
Share on other sites

You know that would be perfect for this is some crashed helo smoke. that really looks good and goes onto the sky nicely

not sure howd you find the code

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×