Jump to content
Sign in to follow this  
austin_medic

[RELEASE] Tornados

Recommended Posts



TORNADOS

by

austin_medic

Just decided to do some messing around with particle effects and this is the final result.

This tornado script, well, does the obvious.

It uses a bunch of smoke particles to make the twister (though it looks a bit awkward at times). There is also some tree branches flying around in the twister and around it. The tornado destorys anything thats within 20 meters of it, and it blows up vehicles and sends them flying in random directions.

Speaking of movement, the twisters movements are pretty much random since I couldn't get it to function any other way to use real wind, or to even move in a particular direction for a set period of time.

To use it is simple really, merge the init.sqf and description.ext files with yours in your mission, and drop a game logic named source somewhere on your map (doesn't matter, script will move it to where it chooses the twister to be).

You then need to alt tab out of game, and go into decideTornado.sqf, and modify _tornadoLocs array, adding in names of your markers that the script will use to determine a location of the twister to start from. In here you can also tweak the values in the if statement to determine how frequently a tornado will actually occur. You can tweak pretty much whatever numbers you want in any of the scripts and it should give you a different result.

Inside tornado.sqf, there is a little array at the top you can use to add units you don't want the twister to kill, you can add onto it, but always leave source in there, since if that gets deleted it'll break the whole script.

Now that we've explored everything we need to change, go back ingame and inside the init box of the game logic named source, put this:

nul = [this] execVM "decideTornado.sqf";

Alternatively, you could simply put

 nul = [source] execVM "decideTornado.sqf";

in init.sqf, but I was a bit too lazy to bother doing that.

I highly doubt this thing is JIP or MP friendly. there is a few global vars that probably won't be synced to JIP players and the random variables will be random for everyone, so everybody will see the twister in a different location.

Update v2

added lightning functionality for those who wanted it. Comes complete with explosions and randomization.

it can be turned off and disabled completely by editing its line inside decidetornado.sqf

added some leaves flying around the tornado in addition to sticks.

As an additional note I would tweak the settings to your liking as I have the chance for it to happen set at 50 -50 for testing purposes, and it happens on the first try usually, setting one random var to > 80 and the other to < 20 will probably make it much less likely to occur (for me it did anyways).

Also turn up the wait time (sleep) inside that script so it isn't trying every 2 seconds to start a tornado.

Mirrors:

Dropbox (v2)

Edited by austin_medic

Share this post


Link to post
Share on other sites

All clients randomize their own numbers in multiplayer, I think even the randomization within the particle effect itself. This is still awesome, I'd love to see a picture or video of it in action. Great job!

Share this post


Link to post
Share on other sites

http://steamcommunity.com/sharedfiles/filedetails/?id=340906834 a pic of it, complete with debug hint in the corner. it ripping around Kavala actually doesn't hurt FPS that much as well, you lose some frames while its destorying buildings, but other than that FPS goes back up after its done spamming particles for the building destruction (the game that is, not my script).

It also doesn't give a crap about weather conditions, didn't bother with that really. You can have a tornado on a completely cloudless day. Video Game Magic applies!

Share this post


Link to post
Share on other sites

LMAO. Austin, you should add a fun lightning parameter. That adds randomly staggered bolts of lightning in the mix. Disregard if you've already done this.

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Update v2

added lightning functionality for those who wanted it. Comes complete with explosions and randomization.

it can be turned off and disabled completely by editing its line inside decidetornado.sqf

added some leaves flying around the tornado in addition to sticks.

As an additional note I would tweak the settings to your liking as I have the chance for it to happen set at 50 -50 for testing purposes, and it happens on the first try usually, setting one random var to > 80 and the other to < 20 will probably make it much less likely to occur (for me it did anyways).

Also turn up the wait time (sleep) inside that script so it isn't trying every 2 seconds to start a tornado.

Mirrors:

Dropbox (v2)

Edited by austin_medic

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

A clearification what is the correct version number would be appreciated.

Thanks for the info, pages corrected.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Edited by Guest

Share this post


Link to post
Share on other sites
Release frontpaged on the Armaholic homepage.

A clearification what is the correct version number would be appreciated.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

its v2, was in a bit of a rush to put this thing up so didn't bother thinking beforehand.

Share this post


Link to post
Share on other sites

Pretty nice ...

questions

- is it possible to make the tornado less dark in color? More grey..it's almost black.

- and is it possible to make it a bit higher?

Share this post


Link to post
Share on other sites
Pretty nice ...

questions

- is it possible to make the tornado less dark in color? More grey..it's almost black.

- and is it possible to make it a bit higher?

I could probably tweak the color settings to make it a bit more gray, making it higher is a bit more challanging since the height is purely based on lifetime and speed. I don't want the particles moving uber fast to gain height, and I don't want the particles to linger too long after the source has moved to another location.

Share this post


Link to post
Share on other sites

Hi Austin. Here are some more suggestions. (If they aren't already available)

1) Add an optional parameter that pass color array(s) to the script. So users can have custom colored tornados.

2) Parameters to control the size of the tornado, thus the wind power would scale accordingly.

User could have custom tornado. Would be neat. Cheers.

Share this post


Link to post
Share on other sites
custom colored tornados.

I desperately wish I knew how to use photoshop so I could quickly whip up a purple tornado now

Share this post


Link to post
Share on other sites

I could probably tweak the color settings to make it a bit more gray, making it higher is a bit more challanging since the height is purely based on lifetime and speed. I don't want the particles moving uber fast to gain height, and I don't want the particles to linger too long after the source has moved to another location.

Most important (for me) is the color. The less it looks like "firesmoke" the better it is in my opinion.

//offtopic

If there was a good (sand)storm script we could mix..a tornado combined with a storm.

I saw this on youtube...

maybe it's not everybody's taste but perhaps it can be tweaked (bit more visibilty/less sandcolor f.e.)

Share this post


Link to post
Share on other sites
I could probably tweak the color settings to make it a bit more gray, making it higher is a bit more challanging since the height is purely based on lifetime and speed. I don't want the particles moving uber fast to gain height, and I don't want the particles to linger too long after the source has moved to another location.

Most important (for me) is the color. The less it looks like "firesmoke" the better it is in my opinion.

//offtopic

If there was a good (sand)storm script we could mix..a tornado combined with a storm.

I saw this on youtube...

maybe it's not everybody's taste but perhaps it can be tweaked (bit more visibilty/less sandcolor f.e.)

the second idea there is interesting. I got a few ideas about how I could hack something like that together.

EDIT: that video doesn't appear to use particles for that effect. It simply cheats on it by coloring the screen itself (post-processing) (at least it looks like that to me,maybe it is particles, who knows)

@Iceman - this tornado doesn't generate wind. its merely asthetic to anything thats > 20 meters away, it only sucks up things that are closer than 20 meters (and only if they have physics). Anything outside that range is unaffected completely (partially because of the inefficient object searching every .01 seconds to find more things to destory/blow up and make fly away.

Share this post


Link to post
Share on other sites

Cool script. Do you have any plans on making it MP friendly?

Share this post


Link to post
Share on other sites
Cool script. Do you have any plans on making it MP friendly?

I could probably make it MP compatible if all randomization went out the window and it became static and only happened at a specific scripted time period (and only once).

Share this post


Link to post
Share on other sites

Hmm. Bare with me here, I like this tornado, and you're definitely capable. But is there any reason why you can't sync everything up? Like have the server essentially create the tornado and store all of the random stuff, and then sync it all to the connected clients?

Or is it just a matter of you not wanting to?

Cheers.

Share this post


Link to post
Share on other sites
Hmm. Bare with me here, I like this tornado, and you're definitely capable. But is there any reason why you can't sync everything up? Like have the server essentially create the tornado and store all of the random stuff, and then sync it all to the connected clients?

Or is it just a matter of you not wanting to?

Cheers.

To be honest I don't have the time now to do it, the game has a habit of driving me up the wall when something that is simplistic and should work ends up falling flat on its face for however many reasons (logic fails probably). I fudged the whole script a few days ago after trying to implement some very basic features and I haven't had the motivation to return to scripting since then.

What compounds the problem even more is the fact that debug box doesn't give me any errors. Which just leads to more frustration as I'm going in circles through my scripts trying to find a tiny tiny tiny problem

Edited by austin_medic

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  

×