• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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?
 
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?
 
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.
Back
Top