OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: laggy on 15 Jul 2008, 17:39:17

Title: Wind. Is it possible to change it?
Post by: laggy on 15 Jul 2008, 17:39:17
Hi all,

Is there anyway to change wind direction and wind speed? I'm working on a sandstorm script and don't want to use "bad" weather (0 setovercast 1, 0 setrain 1) as the solution.

Cheers

Laggy
Title: Re: Wind. Is it possible to change it?
Post by: Mandoble on 15 Jul 2008, 18:07:59
Well, you cannot change ArmA wind (AFAIK), but you may create your own as long as you can use a different velocity vector for your particles than the one provided by default wind. Basically, if your storms are going to be strong, then the velocity vector you will provide for the particles will be much "larger" than the BIS wind, and all your particles would be affected primary and almost only by "your" wind. But if your storms are going to be weak, then you have a problem, as BIS wind might nullify yours.
Title: Re: Wind. Is it possible to change it?
Post by: laggy on 15 Jul 2008, 18:19:44
Thanks alot Mandoble,

Does that also mean that if my own script has stronger wind than default ArmA engine, the trees and foliage will be affected (swinging/bending) by my script as well?

Laggy
Title: Re: Wind. Is it possible to change it?
Post by: Mandoble on 15 Jul 2008, 18:24:04
Nope, nothing would be affected except your own particles. And you may set their friction to 0, so that your particles are not affected at all by ArmA wind.
Title: Re: Wind. Is it possible to change it?
Post by: laggy on 15 Jul 2008, 18:31:07
Thank you so much.

Laggy
Title: Re: Wind. Is it possible to change it?
Post by: Knight Trane on 02 Dec 2008, 10:17:16
I hate to bring up old posts.  But, the topic header says it all.

Mandoble,
How could I apply this to say a stock ArmA smoke grenade?  Say in a 10 mph wind out of the west? 
Any links would be helpful.
Title: Re: Wind. Is it possible to change it?
Post by: Mandoble on 02 Dec 2008, 13:37:25
The problem is that stock ArmA smoke grenade already generates its own smoke, and you cannot change it. What you can do is to create your own smokeless grenade and then script its corresponding smoke effects.
Title: Re: Wind. Is it possible to change it?
Post by: Knight Trane on 02 Dec 2008, 17:26:10
OK,
Now is it possible to reconfigure the stock smoke effect to last longer.  Purely with scripting?  I can put a grenade in a loop, thanks to =Odin=, and Luke.  But its not quite the effect I was looking for.  I was thinking something like large bands of wofting smoke across the battle field.

Title: Re: Wind. Is it possible to change it?
Post by: Tyger on 02 Dec 2008, 18:51:17
The effect you want is to allow the smoke particles to last longer before they disappear. The BIS grenade is pre-scripted. Therefore, without creating a mod for the game, the BIS grenade cannot really be tweaked or such.

There might be a work around with some scripting. Attach an event handler "fired" to the "thrower". The script should detect if the thrown object was a smoke, and if so, use a nearestObject player to find the thrown smoke. Catch the smoke .1m above the ground, and setPos it to something like [0,0,0]. Then, using a script generate your own smoke on the position that you caught the smoke.
Title: Re: Wind. Is it possible to change it?
Post by: Knight Trane on 02 Dec 2008, 23:08:53
Well that makes sense.  I know what the principle is, but I have no idea as to how to make smoke.  Do you have a link to a tutorial or something?
Title: Re: Wind. Is it possible to change it?
Post by: Mandoble on 02 Dec 2008, 23:34:40
here (http://www.ofpec.com/ed_depot/index.php?action=list&game=ArmA&cat=sc&type=fx) you'll find several resources using drop command.