Author: austin(medic)
Author Website:

Requirements: No addons required

Version: 2

Short description: This script creates a tornado inside your mission scenario.

Date: 2014-11-14 23:02


Comments: (1)
Rating:



 



Tornados

by
austin(medic)


Description:
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.


Installation / Usage:
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.


Notes:
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.

I think I covered everything I needed to. But I got like millions of things going through my mind atm, so probably missed something that won't be obvious until later. Let me know below.


Changelog:
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.

v1.0
- first release


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: Particles,   Tornado,   Twister