Random unit not working

The newbie

New Member
Reaction score
0
It isn't random ;( First it kept giving my Hunter, then I changed the random to 1 - 8, then it kept giving me warrior. Dunno what's wrong.

Code:
If - Conditions
    (Player number of (Triggering player)) Greater than or equal to 8
Then - Actions
    Unit - Create 1 HeroTypesAlliance[(Random integer number between 1 and 8)] for (Triggering player) at TempPoint facing Default building facing degrees
Else - Actions
    Unit - Create 1 HeroTypesHorde[(Random integer number between 1 and 8)] for (Triggering player) at TempPoint facing Default building facing degrees
Code:
Set HeroTypesHorde[1] = |cffffff00Rogue|r
Set HeroTypesHorde[6] = |cff9370dbWarlock|r
Set HeroTypesHorde[7] = |cffdeb887Warrior|r
Set HeroTypesHorde[8] = |cff7fff00Hunter|r

My player number is 2 or 3, so I don't think that's the prob.
Ofc there is also HeroTypesHorde[2]-[5], but I only wrote these. It seems that it chooses the highest number always... ;(
 

Tom Jones

N/A
Reaction score
437
Main Editor Window -> File -> Preferences -> Test Map tab -> Use Fixed Random Seeds -> Untag.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
For the first, if you test your map using Test Map in WE random isn't very functionall... try to test it online.
And secondly, you need to uncheck Use Fixed Random Seed by going into File --> Preferences
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top