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

[Trigger] How the hell this doesnt works?!

Status
Not open for further replies.
Level 4
Joined
Jul 22, 2010
Messages
63
  • Golden
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Start GoldenInvasionT as a Repeating timer that will expire in 1500.00 seconds
      • Set GoldenInvasionT = (Last started timer)
      • Countdown Timer - Create a timer window for GoldenInvasionT with title Invasao Dourada
      • Set GoldenInvasion = (Last created timer window)
      • Countdown Timer - Show GoldenInvasion
  • GoldenSpawn
    • Events
      • Time - GoldenInvasionT expires
    • Conditions
    • Actions
      • Set GoldenRandom = (Random real number between 1.00 and 3.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GoldenRandom Equal to 1.00
        • Then - Actions
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 052 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 051 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 050 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Game - Display to (All players) for 30.00 seconds the text: A Invasão dos mons...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GoldenRandom Equal to 2.00
        • Then - Actions
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 056 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 057 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 058 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 059 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Game - Display to (All players) for 30.00 seconds the text: A Invasão dos mons...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GoldenRandom Equal to 3.00
        • Then - Actions
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 054 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 053 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Unit - Create 1 Golden Dragon for Neutral Hostile at (Center of Region 055 <gen>) facing (Random real number between 0.00 and 360.00) degrees
          • Game - Display to (All players) for 30.00 seconds the text: A Invasão dos mons...
        • Else - Actions
      • Unit - Create 1 Golden Lizard King for Neutral Hostile at (Center of Region 041 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Lizard King for Neutral Hostile at (Center of Region 043 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Lizard King for Neutral Hostile at (Center of Region 042 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Tentalos for Neutral Hostile at (Center of Region 044 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Tentalos for Neutral Hostile at (Center of Region 045 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Tentalos for Neutral Hostile at (Center of Region 046 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Ice Giant for Neutral Hostile at (Center of Region 048 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Ice Giant for Neutral Hostile at (Center of Region 049 <gen>) facing (Random real number between 0.00 and 360.00) degrees
      • Unit - Create 1 Golden Ice Giant for Neutral Hostile at (Center of Region 047 <gen>) facing (Random real number between 0.00 and 360.00) degrees
All the units outside the conditions appears. the ones that are conditioned dont.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Side note: You will randomize the same thing everytime in "Test map" in editor. To get real "randoms" you play in wc3 normally.
Alternatively, you can disable the fixed random seed option (which does indeed always give you the same random number).
This can be done in File -> Preferences -> Test Map. Disable the option that says something about the fixed random seed and you'll always get a new random number when testing maps (and while you're there, the General-tab also has the option "Automatically create unknown variables", enable that one).

But yes, you are correct: change the real to an integer and it should work properly.


Edit: I didn't want to say this at first because so many people say it all the time, but I just can't not say it: you've got leaks.
Leaks are what makes the game go slow over time, better fix them!
 
Level 4
Joined
Jul 22, 2010
Messages
63
I know what are leaks, im just not caring about em now.
Changed to integers, it should work now, thanks!
 
Status
Not open for further replies.
Top