• 🏆 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!

Weather Effects Desync

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Hyllo, I was testing my map with my bitch, and when she typed and weather command, he was instantly disconnected...
Why so?
Here's the trigg:
  • Weather Effects
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather snow as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather snow as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather snow as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather snow as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather snow as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather snow as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather snow as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather snow as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather rain as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather rain as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather rain as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather rain as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather rain as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather rain as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather rain as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather rain as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather moonlight as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather moonlight as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather moonlight as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather moonlight as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather moonlight as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather moonlight as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather moonlight as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather moonlight as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather wind as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather wind as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather wind as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather wind as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather wind as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather wind as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather wind as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather wind as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather normal as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather normal as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather normal as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather normal as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather normal as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather normal as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather normal as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather normal as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather random as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather random as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather random as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather random as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather random as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather random as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather random as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather random as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -weather snow
        • Then - Actions
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Environment - Remove TempWeatherEffect
          • Set TempRegion = (Playable map area)
          • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
          • Set TempWeatherEffect = (Last created weather effect)
          • Environment - Turn (Last created weather effect) On
          • Custom script: call RemoveRect(udg_TempRegion)
          • Custom script: endif
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -weather rain
        • Then - Actions
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Environment - Remove TempWeatherEffect
          • Set TempRegion = (Playable map area)
          • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
          • Set TempWeatherEffect = (Last created weather effect)
          • Environment - Turn (Last created weather effect) On
          • Custom script: call RemoveRect(udg_TempRegion)
          • Custom script: endif
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -weather moonlight
        • Then - Actions
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Environment - Remove TempWeatherEffect
          • Set TempRegion = (Playable map area)
          • Environment - Create at TempRegion the weather effect Rays Of Moonlight
          • Set TempWeatherEffect = (Last created weather effect)
          • Environment - Turn (Last created weather effect) On
          • Custom script: call RemoveRect(udg_TempRegion)
          • Custom script: endif
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -weather wind
        • Then - Actions
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Environment - Remove TempWeatherEffect
          • Set TempRegion = (Playable map area)
          • Environment - Create at TempRegion the weather effect Wind (Heavy)
          • Set TempWeatherEffect = (Last created weather effect)
          • Environment - Turn (Last created weather effect) On
          • Custom script: call RemoveRect(udg_TempRegion)
          • Custom script: endif
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -weather normal
        • Then - Actions
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Environment - Remove TempWeatherEffect
          • Custom script: endif
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -weather random
        • Then - Actions
          • Set RandomNumber = (Random integer number between 1 and 4)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomNumber Equal to 1
            • Then - Actions
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Environment - Remove TempWeatherEffect
              • Set TempRegion = (Playable map area)
              • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
              • Set TempWeatherEffect = (Last created weather effect)
              • Environment - Turn (Last created weather effect) On
              • Custom script: call RemoveRect(udg_TempRegion)
              • Custom script: endif
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomNumber Equal to 2
                • Then - Actions
                  • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
                  • Environment - Remove TempWeatherEffect
                  • Set TempRegion = (Playable map area)
                  • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
                  • Set TempWeatherEffect = (Last created weather effect)
                  • Environment - Turn (Last created weather effect) On
                  • Custom script: call RemoveRect(udg_TempRegion)
                  • Custom script: endif
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RandomNumber Equal to 3
                    • Then - Actions
                      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
                      • Environment - Remove TempWeatherEffect
                      • Set TempRegion = (Playable map area)
                      • Environment - Create at TempRegion the weather effect Rays Of Moonlight
                      • Set TempWeatherEffect = (Last created weather effect)
                      • Environment - Turn (Last created weather effect) On
                      • Custom script: call RemoveRect(udg_TempRegion)
                      • Custom script: endif
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RandomNumber Equal to 4
                        • Then - Actions
                          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
                          • Environment - Remove TempWeatherEffect
                          • Set TempRegion = (Playable map area)
                          • Environment - Create at TempRegion the weather effect Wind (Heavy)
                          • Set TempWeatherEffect = (Last created weather effect)
                          • Environment - Turn (Last created weather effect) On
                          • Custom script: call RemoveRect(udg_TempRegion)
                          • Custom script: endif
                        • Else - Actions
        • Else - Actions
 
The problem is that you create/remove handles inside a local block. i don't know wether weather effects are actually agents or handles, but removing or creating a rect locally will definitely cause desyncs. Instead, only move the turn on thing into the local block and it should be fine. If you use JASS instead of a GUI action for weather, you can also change the weather effect style locally by using local strings for the weather effect. Like this, everyone has the same handles created, but the art will still be different.
 
Level 18
Joined
May 11, 2012
Messages
2,103
The problem is that you create/remove handles inside a local block. i don't know wether weather effects are actually agents or handles, but removing or creating a rect locally will definitely cause desyncs. Instead, only move the turn on thing into the local block and it should be fine. If you use JASS instead of a GUI action for weather, you can also change the weather effect style locally by using local strings for the weather effect. Like this, everyone has the same handles created, but the art will still be different.

Will this be better?
  • Weather Effects
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather snow as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather snow as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather snow as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather snow as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather snow as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather snow as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather snow as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather snow as An exact match
    • Conditions
    • Actions
      • Set TempRegion = (Playable map area)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -weather snow
        • Then - Actions
          • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
          • Environment - Remove TempWeatherEffect
          • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
          • Set TempWeatherEffect = (Last created weather effect)
          • Environment - Turn (Last created weather effect) On
          • Custom script: endif
        • Else - Actions
  • Custom script: call RemoveRect(udg_TempRegion)
 
Level 7
Joined
Jan 22, 2013
Messages
293
Didn't I alreadly show you the proper way to make this Blood...? xD Double Post thread ftl.

Same problem is that your not structuring the system right.


Custom script: if GetLocalPlayer() == udg_Player then

If what this is to make sure you don't Dysc you have to make sure you make a Integer set Like this:

  • Weather Effects
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather snow as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather snow as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather snow as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather snow as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather snow as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather snow as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather snow as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather snow as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather rain as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather rain as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather rain as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather rain as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather rain as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather rain as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather rain as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather rain as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather moonlight as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather moonlight as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather moonlight as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather moonlight as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather moonlight as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather moonlight as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather moonlight as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather moonlight as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather wind as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather wind as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather wind as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather wind as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather wind as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather wind as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather wind as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather wind as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather normal as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather normal as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather normal as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather normal as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather normal as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather normal as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather normal as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather normal as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather random as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather random as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather random as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather random as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather random as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather random as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather random as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather random as An exact match
    • Conditions
  • Actions
    • For each (Integer A) from 1 to 8, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Triggering player) Equal to (Player((Integer A)))
          • Then - Actions
            • Set TempPlayer = (Player((Integer A)))
            • Custom script: GetLocalPlayer() == udg_TempPlayer
            • Environment - Turn TempWeatherEffect[(Integer A)] Off
            • Environment - Remove TempWeatherEffect[(Integer A)]
            • Set Weather_Location = (Entire map)
            • -------- ====== SNOW ===== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -Weather Snow
              • Then - Actions
                • Environment - Create at Weather_Location the weather effect Northrend Snow (Heavy)
              • Else - Actions
            • -------- ====== RAIN ===== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -Weather Rain
              • Then - Actions
                • Environment - Create at Weather_Location the weather effect Ashenvale Rain (Heavy)
              • Else - Actions
            • -------- ====== WIND ===== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -Weather Wind
              • Then - Actions
                • Environment - Create at Weather_Location the weather effect Wind (Heavy)
              • Else - Actions
            • Custom script: call RemoveRect(udg_Weather_Location)
            • Set TempWeatherEffect = (Last created weather effect)
            • Environment - Turn TempWeatherEffect[(Integer A)] On
            • Custom script: endif
        • Else - Actions
          • -------- Pick your nose --------
OH YEAH if you want everyone in the game to have their own weather of choice just add a number of weathers to the Integer Table.
Havn't tested it but its the right way. Plus I have never used the
  • Custom script: GetLocalPlayer() == udg_TempPlayer
EVER this is the first time period. I hope it fixes your problem or people can tell me if I did it for him lol.

Anyway.... I'm done here, I'm not to happy you ignored me so I finished your entire trigger use it for it works for everything you want, don't give me rep, you gave it to me last time even though you didn't do anything of what I told you that you needed.
 
Last edited:
Level 18
Joined
May 11, 2012
Messages
2,103
right...
ok, is now better?

  • Weather Effects
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather snow as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather snow as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather snow as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather snow as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather snow as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather snow as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather snow as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather snow as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather rain as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather rain as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather rain as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather rain as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather rain as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather rain as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather rain as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather rain as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather moonlight as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather moonlight as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather moonlight as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather moonlight as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather moonlight as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather moonlight as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather moonlight as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather moonlight as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather wind as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather wind as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather wind as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather wind as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather wind as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather wind as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather wind as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather wind as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather normal as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather normal as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather normal as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather normal as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather normal as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather normal as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather normal as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather normal as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather random as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather random as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather random as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather random as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather random as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather random as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather random as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather random as An exact match
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering player) Equal to (Player((Integer A)))
            • Then - Actions
              • Set TempPlayer = (Player((Integer A)))
              • Custom script: GetLocalPlayer() == udg_TempPlayer
              • Environment - Turn (Last created weather effect) Off
              • Environment - Remove TempWeatherEffect
              • Set TempRegion = (Playable map area)
              • -------- =========== SNOW =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather snow
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
                • Else - Actions
              • -------- =========== RAIN =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather rain
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
                • Else - Actions
              • -------- =========== MOONLIGHT =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather moonlight
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Rays Of Moonlight
                • Else - Actions
              • -------- =========== WIND =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather wind
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Outland Wind (Light)
                • Else - Actions
              • -------- =========== RANDOM =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather random
                • Then - Actions
                  • Set RandomNumber = (Random integer number between 1 and 4)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RandomNumber Equal to 1
                    • Then - Actions
                      • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RandomNumber Equal to 2
                        • Then - Actions
                          • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RandomNumber Equal to 3
                            • Then - Actions
                              • Environment - Create at TempRegion the weather effect Rays Of Moonlight
                              • Custom script: endif
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RandomNumber Equal to 4
                                • Then - Actions
                                  • Environment - Create at TempRegion the weather effect Outland Wind (Light)
                                • Else - Actions
                • Else - Actions
              • Custom script: call RemoveRect(udg_TempRegion)
              • Set TempWeatherEffect = (Last created weather effect)
              • Environment - Turn (Last created weather effect) On
              • Custom script: endif
            • Else - Actions
 
Level 7
Joined
Jan 22, 2013
Messages
293
Not yet, You see I added it so you could have Every player have their own different weathers for them to see. What you have on right now will make it so only one person can have a weather to see then someone else types it then they lost the weather they want on then the new person gets a custom weather but steals it from another person, you have to give everyone their own weather array. Look at my edit fix above your post



EVERYTHING YOU NEED:


  • Weather Effects
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather snow as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather snow as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather snow as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather snow as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather snow as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather snow as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather snow as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather snow as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather rain as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather rain as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather rain as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather rain as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather rain as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather rain as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather rain as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather rain as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather moonlight as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather moonlight as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather moonlight as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather moonlight as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather moonlight as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather moonlight as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather moonlight as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather moonlight as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather wind as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather wind as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather wind as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather wind as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather wind as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather wind as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather wind as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather wind as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather normal as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather normal as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather normal as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather normal as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather normal as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather normal as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather normal as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather normal as An exact match
      • Player - Player 1 (Red) types a chat message containing -weather random as An exact match
      • Player - Player 2 (Blue) types a chat message containing -weather random as An exact match
      • Player - Player 3 (Teal) types a chat message containing -weather random as An exact match
      • Player - Player 4 (Purple) types a chat message containing -weather random as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -weather random as An exact match
      • Player - Player 6 (Orange) types a chat message containing -weather random as An exact match
      • Player - Player 7 (Green) types a chat message containing -weather random as An exact match
      • Player - Player 8 (Pink) types a chat message containing -weather random as An exact match
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering player) Equal to (Player((Integer A)))
            • Then - Actions
              • Set TempPlayer = (Player((Integer A)))
              • Custom script: GetLocalPlayer() == udg_TempPlayer
              • Environment - Turn TempWeatherEffect[(Integer A)] Off
              • Environment - Remove TempWeatherEffect[(Integer A)]
              • Set TempRegion = (Playable map area)
              • -------- =========== SNOW =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather snow
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
                • Else - Actions
              • -------- =========== RAIN =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather rain
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
                • Else - Actions
              • -------- =========== MOONLIGHT =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather moonlight
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Rays Of Moonlight
                • Else - Actions
              • -------- =========== WIND =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather wind
                • Then - Actions
                  • Environment - Create at TempRegion the weather effect Outland Wind (Light)
                • Else - Actions
              • -------- =========== RANDOM =========== --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -weather random
                • Then - Actions
                  • Set RandomNumber = (Random integer number between 1 and 4)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RandomNumber Equal to 1
                    • Then - Actions
                      • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RandomNumber Equal to 2
                        • Then - Actions
                          • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RandomNumber Equal to 3
                            • Then - Actions
                              • Environment - Create at TempRegion the weather effect Rays Of Moonlight
                              • Custom script: endif
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RandomNumber Equal to 4
                                • Then - Actions
                                  • Environment - Create at TempRegion the weather effect Outland Wind (Light)
                                • Else - Actions
                • Else - Actions
              • Custom script: call RemoveRect(udg_TempRegion)
              • Set TempWeatherEffect = TempWeatherEffect[(Integer A)]
              • Environment - Turn TempWeatherEffect[(Integer A)] On
              • Custom script: endif
            • Else - Actions
              • Pick your Nose

The "Custom script: GetLocalPlayer() == udg_TempPlayer" Trigger makes it so only this person can see the weather effect I do believe so in order to make the spell properly you must make the a weather array for each player.
Copy it, make it, don't never need to ask for help on it again. its complete, your Welcome. Please don't double post a thread anymore.
 
Level 18
Joined
May 11, 2012
Messages
2,103
It compiles error: 'elseif'

bump
 

Attachments

  • Error.jpg
    Error.jpg
    232.5 KB · Views: 107
Last edited by a moderator:
Level 7
Joined
Jan 22, 2013
Messages
293
It compiles error: 'elseif'

Whoops, my fault bro I made a typo on you

  • Custom script: if GetLocalPlayer() == udg_TempPlayer then
Typo Fix.

I forgot to place "if" "then"

Doh!

  • Actions
    • For each (Integer A) from 1 to 8, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Triggering player) Equal to (Player((Integer A)))
          • Then - Actions
            • Set TempPlayer = (Player((Integer A)))
            • Custom script: GetLocalPlayer() == udg_TempPlayer ---------------------< EPIC Forget Situation.
            • Environment - Turn TempWeatherEffect[(Integer A)] Off
            • Environment - Remove TempWeatherEffect[(Integer A)]
            • Set TempRegion = (Playable map area)
Problem was in the beginning section.
 
Not yet, You see I added it so you could have Every player have their own different weathers for them to see. What you have on right now will make it so only one person can have a weather to see then someone else types it then they lost the weather they want on then the new person gets a custom weather but steals it from another person, you have to give everyone their own weather array. Look at my edit fix above your post



EVERYTHING YOU NEED:


  • Conditions
  • Actions
    • For each (Integer A) from 1 to 8, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Triggering player) Equal to (Player((Integer A)))
          • Then - Actions
            • Set TempPlayer = (Player((Integer A)))
            • Custom script: GetLocalPlayer() == udg_TempPlayer
            • Environment - Turn TempWeatherEffect[(Integer A)] Off
            • Environment - Remove TempWeatherEffect[(Integer A)]
            • Set TempRegion = (Playable map area)
            • -------- =========== SNOW =========== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -weather snow
              • Then - Actions
                • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
              • Else - Actions
            • -------- =========== RAIN =========== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -weather rain
              • Then - Actions
                • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
              • Else - Actions
            • -------- =========== MOONLIGHT =========== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -weather moonlight
              • Then - Actions
                • Environment - Create at TempRegion the weather effect Rays Of Moonlight
              • Else - Actions
            • -------- =========== WIND =========== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -weather wind
              • Then - Actions
                • Environment - Create at TempRegion the weather effect Outland Wind (Light)
              • Else - Actions
            • -------- =========== RANDOM =========== --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Entered chat string) Equal to -weather random
              • Then - Actions
                • Set RandomNumber = (Random integer number between 1 and 4)
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • RandomNumber Equal to 1
                  • Then - Actions
                    • Environment - Create at TempRegion the weather effect Northrend Snow (Heavy)
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • RandomNumber Equal to 2
                      • Then - Actions
                        • Environment - Create at TempRegion the weather effect Ashenvale Rain (Heavy)
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • RandomNumber Equal to 3
                          • Then - Actions
                            • Environment - Create at TempRegion the weather effect Rays Of Moonlight
                            • Custom script: endif
                          • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • RandomNumber Equal to 4
                              • Then - Actions
                                • Environment - Create at TempRegion the weather effect Outland Wind (Light)
                              • Else - Actions
              • Else - Actions
            • Custom script: call RemoveRect(udg_TempRegion)
            • Set TempWeatherEffect = TempWeatherEffect[(Integer A)]
            • Environment - Turn TempWeatherEffect[(Integer A)] On
            • Custom script: endif
          • Else - Actions
            • Pick your Nose

The "Custom script: GetLocalPlayer() == udg_TempPlayer" Trigger makes it so only this person can see the weather effect I do believe so in order to make the spell properly you must make the a weather array for each player.
Copy it, make it, don't never need to ask for help on it again. its complete, your Welcome. Please don't double post a thread anymore.
Don't. Ever. Do. This. Please!
You make two terrible mistakes:
1) you destroy "Playable Map Area".
2) you destroy a rect locally, which causes handle IDs to go async and desync your game as soon as that ID is reassiged somewhere

Please, if you do not know what you're doing, don't try to help other people if you are making matters worse! Thanks!
 
Level 7
Joined
Jan 22, 2013
Messages
293
Please, if you do not know what you're doing, don't try to help other people if you are making matters worse! Thanks!

Do you realize the degree of ignorance you just peaked right there. Instead of pointing them out and telling me how to help him you just degraded me instead of helping him.

Are you trolling or planning to help him like I have been.

First time I've used the GetLocalPlayer. These Issues are not commonly encountered by me.

And I originally had it like this

Set Weather_Location = (Entire map)

Which is most likely no better then playable map area.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Do you realize the degree of ignorance you just peaked right there. Instead of pointing them out and telling me how to help him you just degraded me instead of helping him.
That is not ignorance, and he did point out your mistakes.

First time I've used the GetLocalPlayer. These Issues are not commonly encountered by me.
This, on the other hand, is ignorance (you don't really know what you're doing). And that is what Zwiebelchen tried to warn you for.

Please don't be upset when other people call you out.
You might actually learn from it!
 
Level 7
Joined
Jan 22, 2013
Messages
293
That is not ignorance, and he did point out your mistakes.


This, on the other hand, is ignorance (you don't really know what you're doing). And that is what Zwiebelchen tried to warn you for.

Please don't be upset when other people call you out.
You might actually learn from it!

I did learn from him, I'm mad that he didn't post the fixes to help the person I am helping. Instead he just ran off.

(I was following the link Maker posted for the trigger I am using)
It said nothing about keeping the Remove Rect out of the Custom Script If then.
Anyway I alreadly knew about the PlayableMapArea. It needs to be its own region.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Don't. Ever. Do. This. Please!
You make two terrible mistakes:
1) you destroy "Playable Map Area".
2) you destroy a rect locally, which causes handle IDs to go async and desync your game as soon as that ID is reassiged somewhere

Please, if you do not know what you're doing, don't try to help other people if you are making matters worse! Thanks!

he did post the fixes they are right here.

It said nothing about keeping the Remove Rect out of the Custom Script If then.

this isnt the problem either. you can put remove rect in custom scripted ITEs. you however cannot put them in getlocalPlayer blocks.
 
Level 7
Joined
Jan 22, 2013
Messages
293
this isnt the problem either. you can put remove rect in custom scripted ITEs. you however cannot put them in getlocalPlayer blocks.

That is a event that was never told to me never use it in a getlocalplayer block.

However I Sent Blood the Fix he did post. Thanks for the info
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
@Orthane
np glad to help

u also know u can shorten the events that u have there by using a substring like this.
this will display snow if u type -weather snow

You can do this for all ur strings and u dont need all those events
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather as A substring
      • Player - Player 2 (Blue) types a chat message containing -weather as A substring
      • Player - Player 3 (Teal) types a chat message containing -weather as A substring
      • Player - Player 4 (Purple) types a chat message containing -weather as A substring
      • Player - Player 5 (Yellow) types a chat message containing -weather as A substring
      • Player - Player 6 (Orange) types a chat message containing -weather as A substring
      • Player - Player 7 (Green) types a chat message containing -weather as A substring
      • Player - Player 8 (Pink) types a chat message containing -weather as A substring
    • Conditions
    • Actions
      • Set tempString = (Entered chat string)
      • Set subStr = (Substring(tempString, 9, (Length of tempString)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to snow
        • Then - Actions
          • Game - Display to (All players) the text: snow
        • Else - Actions
      • Custom script: set udg_tempString = null
      • Custom script: set udg_subStr = null
 
Do you realize the degree of ignorance you just peaked right there. Instead of pointing them out and telling me how to help him you just degraded me instead of helping him.

Are you trolling or planning to help him like I have been.

First time I've used the GetLocalPlayer. These Issues are not commonly encountered by me.

And I originally had it like this

Set Weather_Location = (Entire map)

Which is most likely no better then playable map area.
Don't blame me if you did a mistake, lol. I just wanted to warn the OP that your solution does not work.
And sorry for not presenting a fix to the issue of the OP. I wasn't at home so I couldn't start the WE. I actually wanted to give him a small JASS code snippet he could use, but forgot about it.

Anyway, here is the solution:

JASS:
library Weather

globals
   private boolean firstcall = true
   private integer currenttype = 0
   private weathereffect current = null
   private boolean visible = false
endglobals

function CreateWeatherForPlayer takes player p, integer id returns nothing

if firstcall then
   set firstcall = false
   set current = AddWeatherEffect(bj_mapInitialPlayableArea, id)
   set currenttype = id
   if GetLocalPlayer() == p then
      set visible = true
      call EnableWeatherEffect(current, true)
   endif
else
   if id == 0 then
      if GetLocalPlayer() == p then
         set visible = false
         call EnableWeatherEffect(current, false)
      endif
   else
      if GetLocalPlayer() == p then
         set currenttype = id
         set visible = true
      endif
      call RemoveWeatherEffect(current)
      set current = AddWeatherEffect(bj_mapInitialPlayableArea, currenttype)
      call EnableWeatherEffect(current, visible)
   endif
endif

endfunction

endlibrary
This should do the trick. All you need to do is stuff this into a text converted trigger (assuming you use JNGP) and use this to create your weather:
  • Custom script: CreateWeatherForPlayer(GetTriggerPlayer(), id)
With 'id' being the ascii number of your weathereffect.
To find it out, use the create Weather effect GUI function with your desired effect, convert it to custom text and copy and paste the value with the inverted commas around.

EDIT: Fixed a small issue with setting a weather for the first time.
 
Last edited:
cam you just remake it in GUI? I'm surely gonna screw something up while importing the code....

what is ascii?
It's as easy as copy and paste. There's nothing that can be screwed up.

Ascii:
http://en.wikipedia.org/wiki/Ascii

Basicly, ascii IDs in WC3 are written like this.
'hpea'
This is the unit rawcode of a human peasant.

You simply use the GUI create weather action, select the weather effect you want and convert it to custom text, then there should be the correct rawcode for the weather effect written in there. You use that for "id" in the custom script line I posted above.
 
okay, 1 more thing.
Can you edit the code to use the variables that deathismyfriend used in his trigger posted and nulling them?

Also, does the code contains the variables that Orphan created? If no, can I delete them?
Come on, do you expect me to code your map for you? The tools are there, you should really learn how to use them!
You don't need any of the stuff that has been posted before except the two string variables I used in the trigger below and the library above which has to be copy and pasted in your map:

  • Untitled Trigger 001
    • Events
    • Player - Player 1 (Red) types a chat message containing -weather as A substring
    • Player - Player 2 (Blue) types a chat message containing -weather as A substring
    • Player - Player 3 (Teal) types a chat message containing -weather as A substring
    • Player - Player 4 (Purple) types a chat message containing -weather as A substring
    • Player - Player 5 (Yellow) types a chat message containing -weather as A substring
    • Player - Player 6 (Orange) types a chat message containing -weather as A substring
    • Player - Player 7 (Green) types a chat message containing -weather as A substring
    • Player - Player 8 (Pink) types a chat message containing -weather as A substring
    • Conditions
    • Actions
    • Set tempString = (Entered chat string)
    • Set subStr = (Substring(tempString, 9, (Length of tempString)))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • subStr Equal to snow
    • Then - Actions
    • Custom script: CreateWeatherForPlayer(GetTriggerPlayer(), *ENTER RAWCODE FOR SNOW WEATHER EFFECT HERE*)
    • Else - Actions
 
This is not JASS. I simply posted a library and the GUI custom script that's required to use it. No JASS involved for you, except for copy and pasting the library itself.

Btw, if you also want players to turn the weather off again, use this:
  • Custom script: CreateWeatherForPlayer(GetTriggerPlayer(), 0)
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
here u go i redid this. hope it helps u
  • Weather effects trig
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather as A substring
      • Player - Player 2 (Blue) types a chat message containing -weather as A substring
      • Player - Player 3 (Teal) types a chat message containing -weather as A substring
      • Player - Player 4 (Purple) types a chat message containing -weather as A substring
      • Player - Player 5 (Yellow) types a chat message containing -weather as A substring
      • Player - Player 6 (Orange) types a chat message containing -weather as A substring
      • Player - Player 7 (Green) types a chat message containing -weather as A substring
      • Player - Player 8 (Pink) types a chat message containing -weather as A substring
    • Conditions
    • Actions
      • Set tempInt = (Player number of (Triggering player))
      • Set tempString = (Entered chat string)
      • Set subStr = (Substring(tempString, 9, (Length of tempString)))
      • Set tempRegion = (Playable map area)
      • Custom script: if GetLocalPlayer() == Player( udg_tempInt) then
      • Environment - Remove weatherEff[tempInt]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to snow
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Northrend Snow (Heavy)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to rain
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Ashenvale Rain (Heavy)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to moonlight
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Rays Of Moonlight
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to wind
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Outland Wind (Heavy)
        • Else - Actions
      • Set tempIntRandom = (Random integer number between 1 and 4)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempIntRandom Equal to 1
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Northrend Snow (Heavy)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempIntRandom Equal to 2
            • Then - Actions
              • Environment - Create at tempRegion the weather effect Ashenvale Rain (Heavy)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • tempIntRandom Equal to 3
                • Then - Actions
                  • Environment - Create at tempRegion the weather effect Rays Of Moonlight
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • tempIntRandom Equal to 4
                    • Then - Actions
                      • Environment - Create at tempRegion the weather effect Outland Wind (Heavy)
                    • Else - Actions
      • Set weatherEff[tempInt] = (Last created weather effect)
      • Custom script: endif
      • Set subStr = <Empty String>
      • Set tempString = <Empty String>
      • Set tempRegion = No region
heres a testmap also easier for u to transfer it to ur map. just copy trigger and paste
 

Attachments

  • weather effects.w3x
    8.3 KB · Views: 48
@Deathismyfriend:
You sure this works without desyncing on longer games?
type weathereffect extends handle
Creating/destroying a weathereffect locally might cause differences in handle IDs. I don't know at which position weathereffects are in the handle stack, but I don't feel it's save to do that.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
@Deathismyfriend:
You sure this works without desyncing on longer games?
type weathereffect extends handle
Creating/destroying a weathereffect locally might cause differences in handle IDs. I don't know at which position weathereffects are in the handle stack, but I don't feel it's save to do that.


i didnt know that i will test this to see if it desyncs. your right this does cause a desync.

it didn't desync. i tested it using my pcs. with wc3 running on each. if u still think i should change it i will. i did make a typo in the trigger so here is new one w new map.
  • Weather effects trig
    • Events
      • Player - Player 1 (Red) types a chat message containing -weather as A substring
      • Player - Player 2 (Blue) types a chat message containing -weather as A substring
      • Player - Player 3 (Teal) types a chat message containing -weather as A substring
      • Player - Player 4 (Purple) types a chat message containing -weather as A substring
      • Player - Player 5 (Yellow) types a chat message containing -weather as A substring
      • Player - Player 6 (Orange) types a chat message containing -weather as A substring
      • Player - Player 7 (Green) types a chat message containing -weather as A substring
      • Player - Player 8 (Pink) types a chat message containing -weather as A substring
    • Conditions
    • Actions
      • Set tempInt = ((Player number of (Triggering player)) - 1)
      • Set tempString = (Entered chat string)
      • Set subStr = (Substring(tempString, 10, (Length of tempString)))
      • Set tempRegion = (Entire map)
      • Custom script: if GetLocalPlayer() == Player( udg_tempInt) then
      • Environment - Remove weatherEff[tempInt]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to snow
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Northrend Snow (Heavy)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to rain
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Ashenvale Rain (Heavy)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to moonlight
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Rays Of Moonlight
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to wind
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Outland Wind (Heavy)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • subStr Equal to random
        • Then - Actions
          • Environment - Create at tempRegion the weather effect Outland Wind (Heavy)
        • Else - Actions
      • Set weatherEff[tempInt] = (Last created weather effect)
      • Environment - Turn weatherEff[tempInt] On
      • Custom script: endif
      • Set tempString = <Empty String>
      • Set subStr = <Empty String>
      • Set tempRegion = No region
 

Attachments

  • weather effects.w3x
    8.4 KB · Views: 81
Status
Not open for further replies.
Top