![]() |
#1 | |
Evil Emoticon
Respected User
Project Leader: PoC |
![]() Random weather script
By moyack. 2008. I did this as a request: a code that changes randomly the weather from normal to a rainy day. Due to its configurability and easy to use (just copy it to your map and it will work) I'll post it to the public. Now the current version allows multiple types of weathers and with a few functions you can achieve very nice weather effect transitions. How the script works? The script initializes a timer with a random duration (configurable via globals), and it will change from no weather to a weather environment. if you use the minimalistic version, it will turn on and off in a random way the specified weather. If you use the Standard version, it will do the same but with a set of weathers configured previously. this preconfiguration can be done at map init or at game time... there's no limitation. Credits and Acknowledgments Greetings to Syntic_Arrow for doing the request. Credits to Ammorth for the suggestion of weights to implement randomness Gives credits when you use it... How to install:
Standard version:
![]() ![]() Last edited by moyack : 09-18-2008 at 02:45 AM. |
|
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#2 |
User
|
![]() Seems a little simple.....
__________________ |
![]() |
![]() |
![]() |
#3 |
Alpha Male of Wc3c
Official Map Reviewer
|
![]() One thing: I would put where you can find the rawcode of weather (because I sure don't know).
__________________EDIT: That's why this is a script, not a system. Last edited by darkwulfv : 09-12-2008 at 05:31 AM. |
![]() |
![]() |
![]() |
#4 |
Yay!
Join Date: May 2006
Posts: 870
![]() |
![]() What darkwulfv said, as adjusting this to snow or fog or whatever (or multiple weathers at random times if so) would be great.
__________________ |
![]() |
![]() |
![]() |
#5 |
requires vJass
Code Moderator
|
![]() "Random Rain" is a bit misleading since it could work for any kind of weather.
I say add support for all types of weather, enabling/disabling specific weather types, and setting the relative frequency of each. |
![]() |
![]() |
![]() |
#7 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() I would instead use a weight, as calling:
__________________![]() call SetWeatherChance('RAIN', 1.00) call SetWeatherChance('SNOW', 1.00) wouldn't work out very well. ![]() call SetWeatherChance('RAIN', 8) call SetWeatherChance('SNOW', 3) rain = 8/(8+3) = 72.7% snow = 3/(8+3) = 27.3% |
![]() |
![]() |
![]() |
#8 | |
Evil Emoticon
Respected User
Project Leader: PoC |
![]() Quote:
I've added the weathers (20 in total) and I'm coding the calculation part. As soon as I have them ready, I'll post the updated version. |
|
![]() |
![]() |
![]() |
#9 |
User from USSR
|
![]() change of weather with all map (if it big) can cause a lag, i shared a map on regions and create weathereffect timed in each region
__________________ |
![]() |
![]() |
![]() |
#11 | |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() There is one issue with this script which is not adressed in the setup. The issue is not with the script itself but with the game engine.
__________________Read the bottem of this post for the info: http://www.wc3campaigns.net/showthread.php?t=91176 Quote:
Last edited by Ammorth : 09-18-2008 at 02:54 AM. |
|
![]() |
![]() |
![]() |
#12 | |
Evil Emoticon
Respected User
Project Leader: PoC |
![]() Quote:
Last edited by moyack : 09-18-2008 at 03:44 AM. |
|
![]() |
![]() |
![]() |
#13 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() Its not an issue with effects being displayed, it that you can't create 2 effects of the same "style" on the same grid piece. The only way around this is to remove and then create the new style. The problem with this is that it re-introduces lag caused by weather creation.
__________________ |
![]() |
![]() |
![]() |
#14 |
obey
|
![]() Link some game affect to weather type (i prefer linked list of linked struct, soo you will able to set more then one effect per weather).
Add preload functions, weather lag a lot on first call. Also add some way to call weather locally (turn on\off for single player). |
![]() |
![]() |
![]() |
#15 |
Free Software Terrorist
Technical Director
|
![]() Yes, turn the thing into a non-minimalist monster.
__________________I think linking to effect is interesting but it raises the scope of the initial idea too much, perhaps for a new system, I actually made that one day for TTOR and reused it in my arena, so I might end up releasing a weather system one day. Either way, I don't like this idea too much, but as an utility for those guys that want to have random weather in their map, I guess it is fine, approved. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|