Random Weather

Dest

New Member
Reaction score
26
Is there a way I can make a random weather to happen and how do you detect the current weather so I can make actions?
 

Faust

You can change this now in User CP.
Reaction score
123
You create all weather effects and set them to a variable, then disable them all on map initialization.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Trigger:
  • Untitled Trigger 003
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
      • Set weathereffectVariableArray[1] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • Environment - Create at (Playable map area) the weather effect Northrend Snow (Heavy)
      • Set weathereffectVariableArray[2] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • Environment - Create at (Playable map area) the weather effect Wind (Heavy)
      • Set weathereffectVariableArray[3] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • Set weatherSTRING[1] = Rain
      • Set weatherSTRING[2] = Snow
      • Set weatherSTRING[3] = Wind


Trigger:
  • Untitled Trigger 004
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Environment - Turn weathereffectVariableArray[weatherINDEX] Off
      • Set weatherINDEX = (Random integer number between 1 and 3)
      • Environment - Turn weathereffectVariableArray[weatherINDEX] On
      • Game - Display to (All players) the text: weatherSTRING[weatherINDEX]
 

Dest

New Member
Reaction score
26
Trigger:
  • Untitled Trigger 003
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
      • Set weathereffectVariableArray[1] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • Environment - Create at (Playable map area) the weather effect Northrend Snow (Heavy)
      • Set weathereffectVariableArray[2] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • Environment - Create at (Playable map area) the weather effect Wind (Heavy)
      • Set weathereffectVariableArray[3] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • Set weatherSTRING[1] = Rain
      • Set weatherSTRING[2] = Snow
      • Set weatherSTRING[3] = Wind


Trigger:
  • Untitled Trigger 004
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Environment - Turn weathereffectVariableArray[weatherINDEX] Off
      • Set weatherINDEX = (Random integer number between 1 and 3)
      • Environment - Turn weathereffectVariableArray[weatherINDEX] On
      • Game - Display to (All players) the text: weatherSTRING[weatherINDEX]

It would be nice if you could tell what these variables are based on. Also, how do you detect a weather if it is happening?
 

darkreapers

New Member
Reaction score
6
What the variables mean.


Variable number 1

weathereffectVariableArray

that is your main variable, it is called weather variable found at the end of your variable list.

when you make that variable there is something called array, set that to 3

now when you set the variable just follow his code and put a number [1] in ur first weather [2] in ur 2nd weather and [3] in your third weather

Variable number 2

weatherINDEX

This is a integre variable, used to called random weather effects.

As for your 2nd part of the question, u detect weathers by seening the effect on map xD

if you meant how do you show it as a text to other players?
well if you look at the trigger, u have already set it with ur strings
string [1] = rain.
and when your 2nd variable WeatherIndex, picks a number say [1], ur triggers would show rain.

hope this helped.
 

Dest

New Member
Reaction score
26
What the variables mean.


Variable number 1

weathereffectVariableArray

that is your main variable, it is called weather variable found at the end of your variable list.

when you make that variable there is something called array, set that to 3

now when you set the variable just follow his code and put a number [1] in ur first weather [2] in ur 2nd weather and [3] in your third weather

Variable number 2

weatherINDEX

This is a integre variable, used to called random weather effects.

As for your 2nd part of the question, u detect weathers by seening the effect on map xD

if you meant how do you show it as a text to other players?
well if you look at the trigger, u have already set it with ur strings
string [1] = rain.
and when your 2nd variable WeatherIndex, picks a number say [1], ur triggers would show rain.

hope this helped.

You misunderstood my 2nd question. What I mean how do I detect the weather by triggers so that I can make actions. Get it?

Thanks for question 1 though.
 

carbonduck

New Member
Reaction score
4
If you're using the code that he posted, then just check what the value of weatherINDEX is. If it's 1, it means it's raining. If it's 2, it means... etc. :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top