• 🏆 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 integer trigger help

Status
Not open for further replies.
Level 2
Joined
Sep 12, 2006
Messages
23
Hey, i'm having trouble with my map. I am trying to make a boss encounter where you pick a path, right or left, and you either fight the boss or you fight his twin. However, i want it to be random as to which side the boss is on and which side his twin is on.

I've tried this
Code:
Actions:
Player - Player 1(Red) types a chat message containing -ready as an exact match.
Conditions:
None
Events:
<My Short cinematic>
If/Then/Else Multiple functions
   IF:
     (Random integer between 1 and 100) less than or equal to 50
      Then:
         Unit - Order Boss to move to center of Boss 1<gen>
         Unit - Order Boss Twin to move to center of Boss 2<gen>
       Else:
         Unit - Order Boss to move to center of Boss 2<gen>
         Unit - order Boss Twin to move to center of Boss 1<gen>
<finish cinematic and reset camera to normal>
Trigger - Turn off(This Trigger)

However, if i use Less than or equal to 50 in my condition, the else actions ALWAYS occur, but if i use Greater than or equal to 50, the Then actions always occur, any ideas what im doing wrong, or what the problem may be?
 
Level 2
Joined
Sep 12, 2006
Messages
23
that is not the problem, ive tried it a grand total of 23 times, using the test map button, opening up a custom game in wc3, i even tried it on battle.net, the number is ALWAYS 8. Any other suggestions?
 
Level 8
Joined
Feb 10, 2006
Messages
466
Game Start
Events
Player - Player 1 (Red) types a chat message containing -ready as An exact match
Conditions
Actions
Set Random_number = (Random integer number between 1 and 100)
^-------- moved action to top, everything works now
Destructible - Open Dungeon Gate (Diagonal 1) 0111 <gen>
...

Also:
in skills like BA Atk it's better to have:
(Level of Battle Axe for (Attacking unit)) Not equal to 0
istead of:
(Attacking unit) Equal to BattleAxe
, so you don't have to create BA Learn trigger and spell would be multiinstanceble.
 
Status
Not open for further replies.
Top