snkman 351 Posted August 6, 2007 Hey guy's, well i'm trying to do some things with particles and i found this greate templates: ParticleTemplates I'm playing around with this: <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 setParticleCircle [0, [0, 0, 0]]; _PS1 setParticleRandom [0.5, [1, 1, 0.4], [0, 0, 4], 0, 0.5, [0, 0, 0, 0], 0, 0]; _PS1 setDropInterval 0.01; _PS1 setParticleParams [["\ca\data\ParticleEffects\FireAndSmokeAnim\FireAnim", 8, 2, 1], "", "Billboard", 1, 2, [0, random 0.5, random 1], [0, 0, 1], 10, 1, 0.9, 0.3, [1],[[1,1,1,0.5],[1,1,1,0.2],[1,1,1,0]], [0.5,0.5,0], 1, 1, "", "", _obj]; Now i'm just wondering is there a way to get everything in one line and used with the "drop" command? if i use: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> drop [["\ca\data\ParticleEffects\FireAndSmokeAnim\FireAnim", 8, 2, 1], "", "Billboard", 1, 2, [0, random 0.5, random 1], [0, 0, 1], 10, 1, 0.9, 0.3, [1],[[1,1,1,0.5],[1,1,1,0.2],[1,1,1,0]], [0.5,0.5,0], 1, 1, "", "", _obj] It works but the flames goes high in the sky becouse the other definitions are missing. So is this the only way to use the new Particle effects or is there a way to use it in one line with "drop" Share this post Link to post Share on other sites
dmarkwick 261 Posted August 6, 2007 The setParticle***** commands are good for plopping regular, steady particle sources that run as long as you need them to. If you use the Drop command you got to do a lot more stuff, but along with that you get a lot more control. For a start, the Drop command only produces one single particle, so you need to have it inside a loop if you want a particle flow. You also need to massage the positional & velocity parameters manually if you want to get specific behavior. And very, very carefully balance the weight, volume and rub parameters for post-release behavior. Share this post Link to post Share on other sites
.kju 3245 Posted August 6, 2007 not sure if drop has changed from OFP to ArmA. anyway i could post the wgl effects. phaeden has done a massive effort back then and those are still far better than the ones in ArmA i'd say. maybe good for inspiration to develop new effects at least. Share this post Link to post Share on other sites
snkman 351 Posted August 6, 2007 And how would a drop code with this look like? I know you have a good knowledge with thouse particle effects DMarkwick so may you could help me with a template made out of this one? And if not how can i get the setParticle to stop ( finish ) ? In the biki there is written, that the secound after "Billboard" controles the time so: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "Billboard", 1, 2, So "2" is to controle the time how long the effect should be active. But if i change this i get another effect and its still burning all the time... anyway i could post the wgl effects. phaeden has done a massive effort back then and those are still far better than the ones in ArmA i'd say. maybe good for inspiration to develop new effects at least. WOW yeah this would be Awesome. I already made some tests with the ECP effect's and they look good in ArmA too. Share this post Link to post Share on other sites
dmarkwick 261 Posted August 6, 2007 The second parameter after "Billboard" indicates how long the particle lives, not how long the effect lasts. So 2 would mean 2 seconds. To get the setParticle to finish you can delete it, so use deleteVehicle command to delete the particle source. So if you want the particle source to be active for 1 minute say then stop, you should place a "sleep 60;" command just before the deleteVehicle command. To do the above with a drop command, you need to have the drop line inside a loop, to follow the above example if you wish the particle stream to last for 1 minute you can use this loop initiator: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_timeout2 = time + 60; while {time < _timeout2} do and after the drop command set a sleep command for the length of time you wish to pass before the next particle is generated. A smaller sleep length means a faster rate of particle release. So a sleep command of 0.2 means you will get a particle stream of 5 particles a second for one minute. the entire code block might look like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_timeout2 = time + 60; while {time < _timeout2} do { drop [["\ca\data\ParticleEffects\FireAndSmokeAnim\FireAnim", 8, 2, 1], "", "Billboard", 1, 2, [0, random 0.5, random 1], [0, 0, 1], 10, 1, 0.9, 0.3, [1],[[1,1,1,0.5],[1,1,1,0.2],[1,1,1,0]], [0.5,0.5,0], 1, 1, "", "", _obj]; sleep 0.2; }; Share this post Link to post Share on other sites
.kju 3245 Posted August 7, 2007 there you go: wglevents.rar basically check the *fx folders: *fxinit.sqs - does the initialization types*.sqf - effects get only applied to certain ammo types track_* - tracking scripts (as most are on impact) *fx - those are the actual effect definition files destroyedfx have a different setup of course. it should be understandable nevertheless. note that most effects are have different random parts in there to make it look more natural ("different"). if you feel like using them for your MOD, you should ask Phaeden for "permission" though. he will most certainly allow you to use them by giving credits. feel free to ask more questions. ps: check the shortvar_explanation.txt for better understanding i could revert the var name shortening as well if you have problems. Share this post Link to post Share on other sites