Particles Tutorial: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "Arma[ _]3[ _]Debug[ _]Console" to "Arma 3: Debug Console") |
Lou Montana (talk | contribs) m (Text replacement - "[[Image:" to "[[File:") |
||
Line 155: | Line 155: | ||
=== Burning Vehicle Fire Look-Alike === | === Burning Vehicle Fire Look-Alike === | ||
[[ | [[File:PE_BurningVehicleLookAlike.jpg|thumb|left|100px|Burning vehicle fire look-alike]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 192: | Line 192: | ||
=== Fire === | === Fire === | ||
[[ | [[File:PE_fire.jpg|thumb|left|100px|Fire]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 219: | Line 219: | ||
=== Floating Orb === | === Floating Orb === | ||
[[ | [[File:PE_FloatingOrb.jpg|thumb|left|100px|Floating Orb]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 234: | Line 234: | ||
=== Heavy Oily Smoke (Small) === | === Heavy Oily Smoke (Small) === | ||
[[ | [[File:PE_HeavyOilySmokeSmall.jpg|thumb|left|100px|Heavy Oily Smoke (Small)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 251: | Line 251: | ||
=== Heavy Oily Smoke (Medium) === | === Heavy Oily Smoke (Medium) === | ||
[[ | [[File:PE_HeavyOilySmokeMedium.jpg|thumb|left|100px|Heavy Oily Smoke (Medium)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 268: | Line 268: | ||
=== Heavy Oily Smoke (Large) === | === Heavy Oily Smoke (Large) === | ||
[[ | [[File:PE_HeavyOilySmokeLarge.jpg|thumb|left|100px|Heavy Oily Smoke (Large)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 285: | Line 285: | ||
=== Light Wood Smoke (Small) === | === Light Wood Smoke (Small) === | ||
[[ | [[File:PE_LightWoodSmokeSmall.jpg|thumb|left|100px|Light Wood Smoke (Small)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 302: | Line 302: | ||
=== Light Wood Smoke (Medium) === | === Light Wood Smoke (Medium) === | ||
[[ | [[File:PE_LightWoodSmokeMedium.jpg|thumb|left|100px|Light Wood Smoke (Medium)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 319: | Line 319: | ||
=== Light Wood Smoke (Large) === | === Light Wood Smoke (Large) === | ||
[[ | [[File:PE_LightWoodSmokeLarge.jpg|thumb|left|100px|Light Wood Smoke (Large)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 336: | Line 336: | ||
=== Mixed Smoke (Small) === | === Mixed Smoke (Small) === | ||
[[ | [[File:PE_MixedSmokeSmall.jpg|thumb|left|100px|Mixed Smoke (Small)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 362: | Line 362: | ||
=== Mixed Smoke (Medium) === | === Mixed Smoke (Medium) === | ||
[[ | [[File:PE_MixedSmokeMedium.jpg|thumb|left|100px|Mixed Smoke (Medium)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 388: | Line 388: | ||
=== Mixed Smoke (Large) === | === Mixed Smoke (Large) === | ||
[[ | [[File:PE_MixedSmokeLarge.jpg|thumb|left|100px|Mixed Smoke (Large)]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; | ||
Line 414: | Line 414: | ||
=== Rock Shower === | === Rock Shower === | ||
[[ | [[File:PE_RockShower.jpg|thumb|left|100px|Rock Shower]] | ||
<sqf> | <sqf> | ||
private _posATL = player modelToWorld [0,10,0]; | private _posATL = player modelToWorld [0,10,0]; |
Revision as of 23:12, 20 November 2023
Basics
A particle is a (to some extent, non-physical) 2D plane that always faces the camera, or (more rarely) a 3D model. It can be used to simulate ambient effects, such as dust, fire, water splash, wood splinters and even rock debris.
A particle source is a non-physical object that creates particles at a certain rate and position/velocity.
A particle (as well as a particle source) is local to the computer where the script has been called; one player could see smoke while another could see through without any issue.
How to
Create a particle source
Set source class
Set source parameters
See ParticleArray for details on the array format.
Set source drop interval
Set source drop circle
Set source random values
Set source fire properties
Delete source
Use the drop command
The drop command only drops one particle. If multiple ones are needed, a loop (for, while) must be used.
See ParticleArray for details on the array format.
Design Workflow
In order to determine one particle behaviour, a simple drop usage in the Debug Console can do; but seeing the complete end result can be another task at hand.
Using a Script
One way to design your effect is to have an SQF file, named e.g "particles.sqf", filled with your code:
and run with
This format deletes all previous effects and still allows you to use the Debug Console in order to adjust particle source settings thanks to the usage of global variables (here, ps1 and ps2)
Using a Mod
Emitter 3Ditor (a real-time WYSIWYG particle source editor) adds and uses particle and light emitters in your scenarios without any scripting nor mod dependency.
Steam page - Forums post
Full examples
Burning Vehicle Fire Look-Alike
Fire
Floating Orb
Heavy Oily Smoke (Small)
Heavy Oily Smoke (Medium)
Heavy Oily Smoke (Large)
Light Wood Smoke (Small)
Light Wood Smoke (Medium)
Light Wood Smoke (Large)
Mixed Smoke (Small)
Mixed Smoke (Medium)
Mixed Smoke (Large)
Rock Shower
See also
- Category:Particle System
- ParticleArray - particle array format