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

Random event doesnt work + how to not make all map visible while cut scenes?

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hey i have created maze in game and i have there three rocks i want one of them die randomly every game but trigger i created doesnt work
  • random event Copy
    • Events
      • Time - Elapsed game time is 1.05 seconds
    • Conditions
    • Actions
      • Set rock[1] = Rock Chunks 22856 <gen>
      • Set rock[2] = Rock Chunks 22859 <gen>
      • Set rock[3] = Rock Chunks 22858 <gen>
      • Set rock[4] = Rock Chunks 22856 <gen>
      • Set rock[5] = Rock Chunks 22859 <gen>
      • Set rock[6] = Rock Chunks 22858 <gen>
      • Set rock[7] = Rock Chunks 22856 <gen>
      • Set rock[8] = Rock Chunks 22859 <gen>
      • Set rock[9] = Rock Chunks 22858 <gen>
      • Set rock[10] = Rock Chunks 22856 <gen>
      • Set rock[11] = Rock Chunks 22859 <gen>
      • Set rock[12] = Rock Chunks 22858 <gen>
      • Destructible - Kill rock[(Random integer number between 1 and 12)]
so thats how my trigger with rock looks but the problem is that always rock 22858 gets killed.Its not random at all. I fristly had only three numbers in this trigger rock(1) rock(2) rock (3) my friend gave me idea to create more rock arrays but it still didnt help. I only noticed that other rock gets killed when i press button to restart game then it works normal and a random rock gets killed. But whenever i press altr+f4 run warcraft 3 again only rock 22858 is killed. My map is meant to be played on multiplayer so i cant press there restart game button to kill random rock :(
and also guy told me to go in editor file preferences and uncheck value use random seed. But i had this value alreday unticked so thats not the problem. Any idea what to do







Second question.My map has a few cut scenes but they are played only for a few players while rest of players can see all mini map when the cut scenes are played.Any idea how to fix it? thats example how my trigger with cut scenes looks



  • whats new in the mark
    • Events
      • Unit - A unit enters Whats new in the Mark <gen>
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Set TempLoc = (Center of TalkToEomer <gen>)
      • Unit - Move Aragorn 0001 <gen> instantly to TempLoc, facing 0.00 degrees
      • Unit - Move Gimli 0005 <gen> instantly to TempLoc, facing 0.00 degrees
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Boromir 0003 <gen> is alive) Equal to True
        • Then - Actions
          • Player Group - Add Player 4 (Purple) to AraLegoGimli
          • Unit - Move Boromir 0003 <gen> instantly to TempLoc, facing 0.00 degrees
          • Unit - Pause Boromir 0003 <gen>
        • Else - Actions
      • Unit - Move Legolas 0004 <gen> instantly to TempLoc, facing 0.00 degrees
      • Unit - Pause Aragorn 0001 <gen>
      • Unit - Pause Legolas 0004 <gen>
      • Unit - Pause Gimli 0005 <gen>
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Unit - Unhide Eomer 0114 <gen>
      • Set TempLoc = (Center of Rohirrims north <gen>)
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at TempLoc facing 270.00 degrees
      • Set Rohirrims1 = (Last created unit group)
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Set TempLoc = (Center of Rohirrims south <gen>)
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at TempLoc facing 90.00 degrees
      • Set Rohirrims2 = (Last created unit group)
      • Custom script: call RemoveLocation (udg_TempLoc)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Aragorn 0001 <gen> is alive) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in Rohirrims1 and do (Unit - Order (Picked unit) to Right-Click Aragorn 0001 <gen>)
          • Unit Group - Pick every unit in Rohirrims2 and do (Unit - Order (Picked unit) to Right-Click Aragorn 0001 <gen>)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Legolas 0004 <gen> is alive) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Rohirrims1 and do (Unit - Order (Picked unit) to Right-Click Legolas 0004 <gen>)
              • Unit Group - Pick every unit in Rohirrims2 and do (Unit - Order (Picked unit) to Right-Click Legolas 0004 <gen>)
            • Else - Actions
              • Unit Group - Pick every unit in Rohirrims1 and do (Unit - Order (Picked unit) to Right-Click Gimli 0005 <gen>)
              • Unit Group - Pick every unit in Rohirrims2 and do (Unit - Order (Picked unit) to Right-Click Gimli 0005 <gen>)
      • Cinematic - Turn cinematic mode On for AraLegoGimli
      • Player Group - Pick every player in AraLegoGimli and do (Camera - Apply riders of rohan <gen> for (Picked player) over 0.00 seconds)
      • Wait 0.01 seconds
      • Set TempLoc = (Target of riders of rohan <gen>)
      • Player Group - Pick every player in AraLegoGimli and do (Camera - Rotate camera 180.00 degrees around TempLoc for (Picked player) over 0.00 seconds)
      • Player Group - Pick every player in AraLegoGimli and do (Camera - Rotate camera 180.00 degrees around TempLoc for (Picked player) over 6.00 seconds)
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Wait 6.00 seconds
      • Cinematic - Send transmission to AraLegoGimli from Aragorn 0001 <gen> named Aragorn: Play No sound and display Riders of Rohan, wh.... Modify duration: Set to 2.00 seconds and Don't wait
      • Wait 2.00 seconds
      • Cinematic - Send transmission to AraLegoGimli from Eomer 0114 <gen> named Eomer: Play No sound and display Saruman has poisone.... Modify duration: Set to 3.20 seconds and Don't wait
      • Wait 3.20 seconds
      • Cinematic - Send transmission to AraLegoGimli from Aragorn 0001 <gen> named Aragorn: Play No sound and display We are no spies. We.... Modify duration: Set to 3.50 seconds and Don't wait
      • Wait 3.50 seconds
      • Cinematic - Send transmission to AraLegoGimli from Eomer 0114 <gen> named Eomer: Play No sound and display The Uruks are destr.... Modify duration: Set to 2.20 seconds and Don't wait
      • Wait 2.20 seconds
      • Cinematic - Send transmission to AraLegoGimli from Gimli 0005 <gen> named Gimli: Play No sound and display But there were two .... Modify duration: Set to 2.20 seconds and Don't wait
      • Wait 2.20 seconds
      • Cinematic - Send transmission to AraLegoGimli from Eomer 0114 <gen> named Eomer: Play No sound and display We left none alive..... Modify duration: Set to 4.00 seconds and Don't wait
      • Player Group - Pick every player in AraLegoGimli and do (Camera - Apply uruks ded <gen> for (Picked player) over 3.00 seconds)
      • Wait 5.00 seconds
      • Player Group - Pick every player in AraLegoGimli and do (Camera - Reset camera for (Picked player) to standard game-view over 1.00 seconds)
      • Wait 1.00 seconds
      • Cinematic - Turn cinematic mode Off for AraLegoGimli
      • Unit - Remove Eomer 0114 <gen> from the game
      • Unit Group - Pick every unit in Rohirrims1 and do (Unit - Remove (Picked unit) from the game)
      • Unit Group - Pick every unit in Rohirrims2 and do (Unit - Remove (Picked unit) from the game)
      • Unit - Unpause Aragorn 0001 <gen>
      • Unit - Unpause Legolas 0004 <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Boromir 0003 <gen> is alive) Equal to True
        • Then - Actions
          • Player Group - Remove Player 4 (Purple) from AraLegoGimli
          • Unit - Unpause Boromir 0003 <gen>
        • Else - Actions
      • Unit - Unpause Gimli 0005 <gen>
      • Custom script: call DestroyGroup (udg_Rohirrims1)
      • Custom script: call DestroyGroup (udg_Rohirrims2)
      • Set TempRect = Whats new in the Mark <gen>
      • Custom script: call RemoveRect(udg_TempRect)
      • Set TempRect = Rohirrims north <gen>
      • Custom script: call RemoveRect(udg_TempRect)
      • Set TempRect = Rohirrims south <gen>
      • Custom script: call RemoveRect(udg_TempRect)
      • Set TempRect = TalkToEomer <gen>
      • Custom script: call RemoveRect(udg_TempRect)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
 
Level 11
Joined
Jul 17, 2013
Messages
544
  • Cinematic - Turn cinematic mode On for AraLegoGimli
that line is causing trouble for your rock problem. Try disabling that trigger to see if that works for you.
Ugh but i dont Understant. . . Rock trigger and this are 2 diff things. And rock trigger happens frist before cinematic. + Its not logical for me to rock dont work because of cinematic . I asked u about 2 different questions so i didnt have to create 2 threads
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
Actually I read the function in more detail and it seems like CinematicModeExBJ() does this exact thing I suggested. So this may or may not actually be relevant:
  • Cinematic - Turn cinematic mode On for AraLegoGimli
that line is causing trouble for your rock problem. Try disabling that trigger to see if that works for you.
To clarify, Aeryn is correct here that this line is the problem. It has a SetRandomSeed(0) call in it and then the function later uses another SetRandomSeed(GetRandomInt(...)) call that, because the seed was previously set to 0, always gives the same exact 'new' random seed. So even if you have 'fixed seed' disabled in your WE it will always 'become' fixed after using that cinematic mode function. You can kind of fix it by doing something like this:
  • Set SEED_INT = Random Integer from 1 to 99999 //make the upper bounds as high as you can
  • Cinematic - Turn cinematic mode On for AraLegoGimli
  • ...
  • Cinematic - Turn cinematic mode Off for AraLegoGimli
  • Custom script: call SetRandomSeed(udg_SEED_INT) //change variable name to match yours, but keep the udg_ prefix
Instead of that I would say probably just don't use the Test Map function and it will always correctly be random. Test Map has always been weird in the WE. If restarting the map from within wc3 already gives a proper random seed then it will be properly random playing on LAN or Bnet.
 
Last edited:
Status
Not open for further replies.
Top