• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with trigger

Status
Not open for further replies.
Level 5
Joined
Jul 14, 2014
Messages
115
[SOLVED] Help with trigger

It's supposed to be a weather system I created but it doesn't seem to work :vw_wtf:


REMOVED: Look in further for a reworked version that still doesnt work


Map for download on page 3

[EDIT] SOLVED
 
Last edited:
Level 12
Joined
May 22, 2015
Messages
1,051
So does nothing happen or something weird happens?

Looks like it is a fairly low chance for anything to happen, though you could just wait a while.

The part that is strange is the huge waits. The trigger is trying to make multiple weather effects, but if it ever hits one, it has a giant wait before checking the rest. It could start running again before it finishes running the first time.
 
Level 5
Joined
Jul 14, 2014
Messages
115
So does nothing happen or something weird happens?

Looks like it is a fairly low chance for anything to happen, though you could just wait a while.

The part that is strange is the huge waits. The trigger is trying to make multiple weather effects, but if it ever hits one, it has a giant wait before checking the rest. It could start running again before it finishes running the first time.

Nothing happens at all.
Should I maybe rework the trigger to remove the long waits somehow because I want to randomly combine the wind and the rain but that wouldn't work in two triggers because of the "last created weather effect" which might get screwed up.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Nothing happens at all.
Should I maybe rework the trigger to remove the long waits somehow because I want to randomly combine the wind and the rain but that wouldn't work in two triggers because of the "last created weather effect" which might get screwed up.

There is a way to have it all in one trigger.

Anyway, first, you should check that your actions for creating the weather actually work. Try disabling stuff so you can just isolate each weather effect one at a time and see if they get created and destroyed properly. This is to make sure the problem is not with the actual creation of the weather.

I would restructure the trigger either way. You should set it up so that there is only one wait in the whole trigger. You will see a ton of actions copy-pasted like this:
  • Sound - Play WindLoopStereo <gen>
  • Environment - Create at (Entire map) the weather effect Outland Wind (Heavy)
  • Set WeatherAdditional = (Last created weather effect)
  • Environment - Turn WeatherAdditional On
  • Set WeatherAdditionalTimer = (Random real number between 90.00 and 115.00)
  • Wait WeatherAdditionalTimer seconds
  • Environment - Turn WeatherAdditional Off
  • Sound - Stop WindLoopStereo <gen> After fading
  • Wait 5.00 seconds
  • Environment - Remove WeatherAdditional
and this:
  • Sound - Play RainAmbience <gen>
  • Environment - Create at (Entire map) the weather effect Ashenvale Rain (Light)
  • Set WeatherCurrent = (Last created weather effect)
  • Environment - Turn WeatherCurrent On
  • Set WeatherTimer = (Random real number between 90.00 and 115.00)
  • Wait WeatherTimer seconds
  • Environment - Turn WeatherCurrent Off
  • Sound - Stop RainAmbience <gen> After fading
  • Wait 5.00 seconds
  • Environment - Remove WeatherCurrent
The only difference each time is either it is WeatherCurrent or WeatherAdditional, and what the actual weather effect is. You can make this much much more simple. I won't include all the options just to keep it clear, but basically you want to copy-paste as little as possible:
  • if
    • conditions
      • WeatherExtra equal to 1
    • then
      • if
        • conditions
        • then
          • Environment - Create at (Entire map) the weather effect Outland Wind (Light)
        • else
          • Environment - Create at (Entire map) the weather effect Outland Wind (Heavy)
      • Set WeatherAdditional = (Last created weather effect)
      • Environment - Turn WeatherAdditional On
      • Sound - Play WindLoopStereo <gen>
    • else
  • if
    • conditions
      • WeatherMain equal to 1
    • then
      • if
        • conditions
        • then
          • Environment - Create at (Entire map) the weather effect Ashenvale Rain (Light)
        • else
          • Environment - Create at (Entire map) the weather effect Ashenvale Rain (Heavy)
      • Set WeatherCurrent = (Last created weather effect)
      • Environment - Turn WeatherCurrent On
      • Sound - Play RainAmbience <gen>
    • else
  • Set WeatherTimer = (Random real number between 90.00 and 115.00)
  • Wait WeatherTimer seconds
  • Environment - Turn WeatherCurrent Off
  • Sound - Stop RainAmbience <gen> After fading
  • Sound - Stop WindLoopStereo <gen> After fading
  • Wait 5.00 seconds
  • Environment - Remove WeatherCurrent
  • Environment - Remove WeatherAdditional
I guess there is one thing that is inconsistent and that is that the addition and main weather effects will always last the same amount of time. Anyway, the idea is that you create a random weather effect at the start and then deal with it at the end.
 
Level 12
Joined
Jan 2, 2016
Messages
973
I see something that is bothering me in this trigger...
The way it is now: if WeatherExtra is 1 and WeatherMain is 1 or 2 - the 1-st part of your trigger will run (for WeatherExtra) then after ~100 seconds the WeatherMain part will start runing, but by that time the trigger will run again.
I'd either put the WeatherMain part of the trigger in the "Else" of the WeatherExtra, either I will put one "Skip remaining actions" in the end of each possiblity of the WeatherExtra.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Your trigger has support for only 2 weather because one weather effect could be placed inside of "then actions" and inside of "else action", but then there is no space for a third weather effect anymore




Thanks a lot, everyone! I'll report back once I tried everything

Ya I was just throwing it together quickly so it is easier to read and faster for me to write. It also doesn't include all the different paths in your trigger. I didn't even include the conditions and setting the random variables. Hopefully you can make sense of it, at least. I think the main flow of the trigger is what is most important there.

It is possible also to use timers to destroy the weather effects. It is better than waits because they are more accurate and also waits do annoying things when you play online. Using timers would also allow you to have different lengths for each effect. Good luck with the testing!
 
Level 5
Joined
Jul 14, 2014
Messages
115
I reworked the trigger but still getting the same issue: NOTHING HAPPENS. It seems that after the WeatherSelector var is given a random value the if,then,else don't check anything at all.

Here are the triggers:


  • WeatherStorage
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
      • Set WeatherMain[1] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • -------- ---------------- --------
      • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Heavy)
      • Set WeatherMain[2] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • -------- ---------------- --------
      • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Light)
      • Set WeatherMain[3] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • -------- ---------------- --------
      • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)
      • Set WeatherMain[4] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • -------- ---------------- --------
      • Environment - Create at (Playable map area) the weather effect Outland Wind (Heavy)
      • Set WeatherAdditional[1] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • -------- ---------------- --------
      • Environment - Create at (Playable map area) the weather effect Outland Wind (Light)
      • Set WeatherAdditional[2] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
      • -------- ---------------- --------
      • Environment - Create at (Playable map area) the weather effect Wind (Heavy)
      • Set WeatherAdditional[3] = (Last created weather effect)
      • Environment - Turn (Last created weather effect) Off
  • DynamicRain
    • Events
      • Time - Every 120.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[1] = (Random integer number between 1 and 5)
      • -------- Heavy Rain --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[1] Equal to 1
        • Then - Actions
          • Set WeatherSelector[2] = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[2] Equal to 1
            • Then - Actions
              • Environment - Turn WeatherMain[1] On
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[2] Equal to 2
            • Then - Actions
              • Environment - Turn WeatherMain[2] On
            • Else - Actions
        • Else - Actions
      • -------- Light Rain --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[1] Equal to 2
        • Then - Actions
          • Set WeatherSelector[3] = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[3] Equal to 1
            • Then - Actions
              • Environment - Turn WeatherMain[3] On
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[3] Equal to 2
            • Then - Actions
              • Environment - Turn WeatherMain[4] On
            • Else - Actions
        • Else - Actions
      • Sound - Play RainAmbience <gen>
      • Set WeatherTimer[1] = (Random real number between 90.00 and 120.00)
      • Wait WeatherTimer[1] seconds
      • Environment - Turn WeatherMain[1] Off
      • Environment - Turn WeatherMain[2] Off
      • Environment - Turn WeatherMain[3] Off
      • Environment - Turn WeatherMain[4] Off
      • Sound - Stop RainAmbience <gen> After fading
  • DynamicWind
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[4] = (Random integer number between 1 and 6)
      • -------- Wind --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 1
        • Then - Actions
          • Environment - Turn WeatherAdditional[1] On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 2
        • Then - Actions
          • Environment - Turn WeatherAdditional[2] On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 3
        • Then - Actions
          • Environment - Turn WeatherAdditional[3] On
        • Else - Actions
      • Sound - Play WindLoopStereo <gen>
      • Set WeatherTimer[2] = (Random real number between 40.00 and 60.00)
      • Wait WeatherTimer[2] seconds
      • Environment - Turn WeatherAdditional[1] Off
      • Environment - Turn WeatherAdditional[2] Off
      • Environment - Turn WeatherAdditional[3] Off
      • Sound - Stop WindLoopStereo <gen> After fading
 
Level 12
Joined
May 22, 2015
Messages
1,051
Did you try just turning them on without doing all the checks? Do you hear the sounds play or anything? You could use the action that displays a message for all players and have it output stuff to see where the code is going or if it's being run at all.

I modified the triggers a bit to make them more simple:

EDIT:
I also moved the sounds into the if statements so that they don't play if no weather is selected.


  • DynamicRain
    • Events
      • Time - Every 120.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[1] = (Random integer number between 1 and 10)
      • -------- Heavy Rain --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[1] Less than or equal to 4
        • Then - Actions
          • Environment - Turn WeatherMain[WeatherSelector[1]] On
          • Sound - Play RainAmbience <gen>
        • Else - Actions
      • Set WeatherTimer[1] = (Random real number between 90.00 and 120.00)
      • Wait WeatherTimer[1] seconds
      • Environment - Turn WeatherMain[1] Off
      • Environment - Turn WeatherMain[2] Off
      • Environment - Turn WeatherMain[3] Off
      • Environment - Turn WeatherMain[4] Off
      • Sound - Stop RainAmbience <gen> After fading
  • DynamicWind
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[4] = (Random integer number between 1 and 6)
      • -------- Wind --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Less than or equal to 3
        • Then - Actions
          • Environment - Turn WeatherAdditional[WeatherSelector[4]] On
          • Sound - Play WindLoopStereo <gen>
        • Else - Actions
      • Set WeatherTimer[2] = (Random real number between 40.00 and 60.00)
      • Wait WeatherTimer[2] seconds
      • Environment - Turn WeatherAdditional[1] Off
      • Environment - Turn WeatherAdditional[2] Off
      • Environment - Turn WeatherAdditional[3] Off
      • Sound - Stop WindLoopStereo <gen> After fading
 
Level 5
Joined
Jul 14, 2014
Messages
115
Did you try just turning them on without doing all the checks? Do you hear the sounds play or anything? You could use the action that displays a message for all players and have it output stuff to see where the code is going or if it's being run at all.

I modified the triggers a bit to make them more simple:

EDIT:
I also moved the sounds into the if statements so that they don't play if no weather is selected.


  • DynamicRain
    • Events
      • Time - Every 120.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[1] = (Random integer number between 1 and 10)
      • -------- Heavy Rain --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[1] Less than or equal to 4
        • Then - Actions
          • Environment - Turn WeatherMain[WeatherSelector[1]] On
          • Sound - Play RainAmbience <gen>
        • Else - Actions
      • Set WeatherTimer[1] = (Random real number between 90.00 and 120.00)
      • Wait WeatherTimer[1] seconds
      • Environment - Turn WeatherMain[1] Off
      • Environment - Turn WeatherMain[2] Off
      • Environment - Turn WeatherMain[3] Off
      • Environment - Turn WeatherMain[4] Off
      • Sound - Stop RainAmbience <gen> After fading
  • DynamicWind
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[4] = (Random integer number between 1 and 6)
      • -------- Wind --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Less than or equal to 3
          • Sound - Play WindLoopStereo <gen>
        • Then - Actions
          • Environment - Turn WeatherAdditional[WeatherSelector[4]] On
        • Else - Actions
      • Set WeatherTimer[2] = (Random real number between 40.00 and 60.00)
      • Wait WeatherTimer[2] seconds
      • Environment - Turn WeatherAdditional[1] Off
      • Environment - Turn WeatherAdditional[2] Off
      • Environment - Turn WeatherAdditional[3] Off
      • Sound - Stop WindLoopStereo <gen> After fading

I tried and the sound and weather effects definitely work separately. I also tried putting send message into every part of the trigger and the only part that works is where WeatherSelector is assigned a random number. All the other parts seem to be ignored or whatever
 
Level 12
Joined
May 22, 2015
Messages
1,051
I tried and the sound and weather effects definitely work separately. I also tried putting send message into every part of the trigger and the only part that works is where WeatherSelector is assigned a random number. All the other parts seem to be ignored or whatever

Did you put them after the if statements to turn on one of the weather effects? Did you put them after the waits? This seems very strange to me. It looks like it should work. Try having it so one of the weather effects should always turn on.
 
Level 11
Joined
Jun 2, 2013
Messages
613
I used this for setting random weather in a map:
Can probably be done with an array, I chose this way because It was easier to read in my systems.
  • Actions
    • Set WeatherType = (Random integer number between 1 and 6)
    • If (WeatherType Equal to 1) then do (Environment - Create at (Playable map area) the weather effect Outland Wind (Heavy)) else do (Do nothing)
    • If (WeatherType Equal to 2) then do (Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)) else do (Do nothing)
    • If (WeatherType Equal to 3) then do (Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)) else do (Do nothing)
    • If (WeatherType Equal to 4) then do (Environment - Create at (Playable map area) the weather effect Outland Wind (Light)) else do (Do nothing)
    • If (WeatherType Equal to 5) then do (Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Heavy)) else do (Do nothing)
    • If (WeatherType Equal to 6) then do (Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Light)) else do (Do nothing)
    • Set CurrentWeatherEffect = (Last created weather effect)
    • Environment - Turn (Last created weather effect) On
 
Level 5
Joined
Jul 14, 2014
Messages
115
For testing purposes I'd make the WeatherSelector vary from 1 to 2 (not from 1 to 5) to see if the whole thing is working.

Already

Why you don't just use my whole system, it works perfectly, you can just add the sound to it if you want...

It doesn't work like I want it to. I need to combine the wind (WeatherAdditional) and rain (WeatherMain). As I said I used your "store them" trigger though.

I used this for setting random weather in a map:
Can probably be done with an array, I chose this way because It was easier to read in my systems.
  • Actions
    • Set WeatherType = (Random integer number between 1 and 6)
    • If (WeatherType Equal to 1) then do (Environment - Create at (Playable map area) the weather effect Outland Wind (Heavy)) else do (Do nothing)
    • If (WeatherType Equal to 2) then do (Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)) else do (Do nothing)
    • If (WeatherType Equal to 3) then do (Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)) else do (Do nothing)
    • If (WeatherType Equal to 4) then do (Environment - Create at (Playable map area) the weather effect Outland Wind (Light)) else do (Do nothing)
    • If (WeatherType Equal to 5) then do (Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Heavy)) else do (Do nothing)
    • If (WeatherType Equal to 6) then do (Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Light)) else do (Do nothing)
    • Set CurrentWeatherEffect = (Last created weather effect)
    • Environment - Turn (Last created weather effect) On

That is kind of the way i did it anyway

Did you put them after the if statements to turn on one of the weather effects? Did you put them after the waits? This seems very strange to me. It looks like it should work. Try having it so one of the weather effects should always turn on.

I did this:


  • WindAtStart
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Start
      • Set WeatherSelector[4] = (Random integer number between 1 and 6)
      • -------- Wind --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: Outland Wind Heavy
          • Environment - Turn WeatherAdditional[1] On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: Outland Wind Light
          • Environment - Turn WeatherAdditional[2] On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 3
        • Then - Actions
          • Game - Display to (All players) the text: Wind Heavy
          • Environment - Turn WeatherAdditional[3] On
        • Else - Actions
      • Game - Display to (All players) the text: Finish
      • Sound - Play WindLoopStereo <gen>
      • Set WeatherTimer[2] = (Random real number between 40.00 and 60.00)
      • Wait WeatherTimer[2] seconds
      • Environment - Turn WeatherAdditional[1] Off
      • Environment - Turn WeatherAdditional[2] Off
      • Environment - Turn WeatherAdditional[3] Off
      • Sound - Stop WindLoopStereo <gen> After fading


And only the messages "start" and "finish" are displayed but not any of the "Outland Wind Heavy", "Outland Wind Light" or "Wind Heavy" are displayed :I

EDIT: Is this maybe because I'm using WE JNGP by any chance?
 
Level 12
Joined
May 22, 2015
Messages
1,051
Already



It doesn't work like I want it to. I need to combine the wind (WeatherAdditional) and rain (WeatherMain). As I said I used your "store them" trigger though.



That is kind of the way i did it anyway



I did this:


  • WindAtStart
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Start
      • Set WeatherSelector[4] = (Random integer number between 1 and 6)
      • -------- Wind --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: Outland Wind Heavy
          • Environment - Turn WeatherAdditional[1] On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 2
        • Then - Actions
          • Game - Display to (All players) the text: Outland Wind Light
          • Environment - Turn WeatherAdditional[2] On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 3
        • Then - Actions
          • Game - Display to (All players) the text: Wind Heavy
          • Environment - Turn WeatherAdditional[3] On
        • Else - Actions
      • Game - Display to (All players) the text: Finish
      • Sound - Play WindLoopStereo <gen>
      • Set WeatherTimer[2] = (Random real number between 40.00 and 60.00)
      • Wait WeatherTimer[2] seconds
      • Environment - Turn WeatherAdditional[1] Off
      • Environment - Turn WeatherAdditional[2] Off
      • Environment - Turn WeatherAdditional[3] Off
      • Sound - Stop WindLoopStereo <gen> After fading


And only the messages "start" and "finish" are displayed but not any of the "Outland Wind Heavy", "Outland Wind Light" or "Wind Heavy" are displayed :I

EDIT: Is this maybe because I'm using WE JNGP by any chance?

How many times did you try it? As is, it is a 50% chance that it gets into any of those if statements. You could change
  • Set WeatherSelector[4] = (Random integer number between 1 and 6)
to
  • Set WeatherSelector[4] = (Random integer number between 1 and 3)
Then it should do something.
 
Level 5
Joined
Jul 14, 2014
Messages
115
How many times did you try it? As is, it is a 50% chance that it gets into any of those if statements. You could change
  • Set WeatherSelector[4] = (Random integer number between 1 and 6)
to
  • Set WeatherSelector[4] = (Random integer number between 1 and 3)
Then it should do something.

Ok. Now it actually displays the messages but no effects are played. I: they work separately
 
Level 12
Joined
May 22, 2015
Messages
1,051
I just noticed that you switched the event to map initialization. That might cause problems since the trigger that sets the variables is also set during map initialization. It is hard to tell which one gets run first. Try changing it to time elapsed - 5 seconds or something like that.
 
Level 5
Joined
Jul 14, 2014
Messages
115
I just noticed that you switched the event to map initialization. That might cause problems since the trigger that sets the variables is also set during map initialization. It is hard to tell which one gets run first. Try changing it to time elapsed - 5 seconds or something like that.

I tried with the "every 60.00 second of game time" too but that didn't change anything. I changed to map initialization for faster testing
 
Level 12
Joined
May 22, 2015
Messages
1,051
I tried with the "every 60.00 second of game time" too but that didn't change anything. I changed to map initialization for faster testing

I would still make it like 1 second in just so that it definitely doesn't happen before the initialization trigger (the one that creates the actual weather effects and stuff).

I may have to poke around with some triggers in order to help you. Just from looking at it, it should work. I have some super old and crappy weather system in my map that I made a long time ago before I knew much about triggers lol. I wanted to revamp it, anyway, so I can test around with that.

You could also potentially share your map if you are okay with that. Someone may be able to figure it out by looking at all your triggers and maybe fiddling around with them. I can do that, but probably not until later tonight or tomorrow night.

I'll get back to you if I find anything.
 
Level 5
Joined
Jul 14, 2014
Messages
115
I would still make it like 1 second in just so that it definitely doesn't happen before the initialization trigger (the one that creates the actual weather effects and stuff).

I may have to poke around with some triggers in order to help you. Just from looking at it, it should work. I have some super old and crappy weather system in my map that I made a long time ago before I knew much about triggers lol. I wanted to revamp it, anyway, so I can test around with that.

You could also potentially share your map if you are okay with that. Someone may be able to figure it out by looking at all your triggers and maybe fiddling around with them. I can do that, but probably not until later tonight or tomorrow night.

I'll get back to you if I find anything.


Thanks, but I don't really want to post my map. The triggers I've posted before are the only ones that I have for the system.
 
Level 5
Joined
May 12, 2014
Messages
133
Have you checked your graphics settings? If it's set to something low, chances are that the weather effect won't show. I actually screwed over my own weather effects because of this dumb mistake. Your trigger looks like it works, so try checking your settings.
 
Level 5
Joined
Jul 14, 2014
Messages
115
Have you checked your graphics settings? If it's set to something low, chances are that the weather effect won't show. I actually screwed over my own weather effects because of this dumb mistake. Your trigger looks like it works, so try checking your settings.

I already said in previous posts that they weather effects work fine separately but thanks for the advice anyway
 
Level 5
Joined
May 12, 2014
Messages
133
I'll try checking out my own system when I get home then. Cause I remember stacking the effects successfully.

EDIT: Nope. Just checked my own map. Weather effects didn't stack at all for me. Must have been a late night and I was hallucinating the effects with each other. Sorry but I can't help at all :/
Maybe weather effects can't be stacked?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
You cannot stack weather effects very well. I remember trying a long time ago and usually only 1 will be visible in an area at any given time. I have seen some maps manage it but I am not sure if it was destructible trickery (dummy models for other weather art), a fluke bug or some hacky way to make multiple weather art stack.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I looked at my triggers and it is very simple (and also probably very bad lol). It just creates the weather effect I want and then does "turn <last created weather effect> on". It works like that.

I haven't updated it yet, but I want to try out a set up more like yours (storing the weather effects etc). It's just a cleaner way to do it. I will come back here when it is done or if I find something weird.
 
Level 11
Joined
Jun 2, 2013
Messages
613
Figured it out.

Looks like Weather effects do stack somewhat but there seems to be a limitation

You can only have one Rain Effect ( Heavy or Light) + One Light Effect (Sunlight or Moonlight) + Snow Effect (Heavy or Light) + One Wind Effect (Fog or Wind)

Here are the Categories. From what I've tested No weather type can stack with one in the same category, however this may not be 100% accurate.

--Lights--
Rays of Light
Dalaran Shield
Rays of Moonlight

---Rain---
Ashenvale Rain (Light)
Ashenvale Rain (Heavy)
Lordaeron Rain (Light)
Lordearon Rain (Heavy)

---Winds---
Dungeon Fog Green (Heavy)
Dungeon Fog Green (Light)
Dungeon Fog White (Heavy)
Dungeon Fog White (Light)
Dungeon Fog Blue (Heavy)
Dungeon Fog Blue (Light)
Dungeon Fog Red (Heavy)
Dungeon Fog Red (Light)
Outland Wind (Light)
Outland Wind (Heavy)
Wind (Heavy)

---Snow---
Northrend Blizzard
Northrend Snow (Light)
Northrend Snow (Heavy)

Basically, you can't turn on a SIMILAR weather effect without destroying the previous one first. When you had all 4 variables set to Rain only the FIRST effect that was created could be turned on in the second trigger.

I've attached a new map with a few changes and debug messages so you can see what I'm talking about.

For different Rains/Snows/Fogs/or Winds, you'll have to create the weather effect in the Dynamic Weather Trigger and destroy that effect before changing weather again.
 

Attachments

  • WeatherBroken.w3x
    17.6 KB · Views: 30

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
If GUI supported weather preset variables things would be so much easier. Since it does not one has to use custom script for that functionality.

Attached is a revision of your weather system. To keep everyone's sanity it is now completely data fed. You can add new types of data to the system such as abilities to give dummy units so the weather interacts with gameplay. You could repeat such a system for each type of weather effect you want to stack that can stack.
 

Attachments

  • Melonslise - WeatherSystem 1.0.w3x
    17.1 KB · Views: 25
Level 5
Joined
Jul 14, 2014
Messages
115
I get it now. Apparently I was stacking weather effects which is impossible. Thanks to everyone who helped. Here are my fixed triggers if anyone wants them :


  • DynamicRain
    • Events
      • Time - Every 120.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[1] = (Random integer number between 1 and 4)
      • -------- Heavy Rain --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[1] Equal to 1
        • Then - Actions
          • Set WeatherSelector[2] = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[2] Equal to 1
            • Then - Actions
              • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
              • Set WeatherMainCurrent = (Last created weather effect)
              • Environment - Turn WeatherMainCurrent On
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[2] Equal to 2
            • Then - Actions
              • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Heavy)
              • Set WeatherMainCurrent = (Last created weather effect)
              • Environment - Turn WeatherMainCurrent On
            • Else - Actions
        • Else - Actions
      • -------- Light Rain --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[1] Equal to 2
        • Then - Actions
          • Set WeatherSelector[3] = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[3] Equal to 1
            • Then - Actions
              • Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Light)
              • Set WeatherMainCurrent = (Last created weather effect)
              • Environment - Turn WeatherMainCurrent On
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WeatherSelector[3] Equal to 2
            • Then - Actions
              • Environment - Create at (Playable map area) the weather effect Lordaeron Rain (Light)
              • Set WeatherMainCurrent = (Last created weather effect)
              • Environment - Turn WeatherMainCurrent On
            • Else - Actions
        • Else - Actions
      • Set WeatherTimer[1] = (Random real number between 60.00 and 115.00)
      • Wait WeatherTimer[1] seconds
      • Environment - Turn WeatherMainCurrent Off
      • Environment - Remove WeatherMainCurrent
  • DynamicWind
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set WeatherSelector[4] = (Random integer number between 1 and 7)
      • -------- Wind --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 1
        • Then - Actions
          • Environment - Create at (Playable map area) the weather effect Outland Wind (Heavy)
          • Set WeatherAdditionalCurrent = (Last created weather effect)
          • Environment - Turn WeatherAdditionalCurrent On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 2
        • Then - Actions
          • Environment - Create at (Playable map area) the weather effect Outland Wind (Heavy)
          • Set WeatherAdditionalCurrent = (Last created weather effect)
          • Environment - Turn WeatherAdditionalCurrent On
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WeatherSelector[4] Equal to 3
        • Then - Actions
          • Environment - Create at (Playable map area) the weather effect Outland Wind (Heavy)
          • Set WeatherAdditionalCurrent = (Last created weather effect)
          • Environment - Turn WeatherAdditionalCurrent On
        • Else - Actions
      • Set WeatherTimer[2] = (Random real number between 30.00 and 55.00)
      • Wait WeatherTimer[2] seconds
      • Environment - Turn WeatherAdditionalCurrent Off
      • Environment - Remove WeatherAdditionalCurrent
 
Status
Not open for further replies.
Top