• 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.

Randomize Ownership

Status
Not open for further replies.
Level 5
Joined
Jul 25, 2008
Messages
155
Hello, is it possible to randomize and assign ownership to buildings with GUI? I am making a Risk-like map, and I wish to randomize the ownership of the buildings at the start, but havn't fixed it out yet, and saw a GUI-jass trigger which I didn't understand anything from, and thought it would be easier with a GUI trigger for it, would appreciate some help :wink:
 
Level 5
Joined
Jul 25, 2008
Messages
155
How do i make this random integer then?
  • check Moria
    • Events
    • Conditions
      • (Owner of Balins Tomb [Moria] 0196 <gen>) Equal to (Player((Integer A)))
      • (Owner of Khazad Dum [Moria] 0186 <gen>) Equal to (Player((Integer A)))
      • (Owner of The Hall of Moria [Moria] 0182 <gen>) Equal to (Player((Integer A)))
    • Actions
      • Set Gold_received[(Integer A)] = (Gold_received[(Integer A)] + 4)
      • Unit - Create 1 Dwarf Kings Guard for (Player((Integer A))) at (Center of Moria <gen>) facing Default building facing degrees
      • Game - Display to (Player group((Player((Integer A))))) the text: You control Moria
  • Say hintseriador
    • Events
      • Player - Player 1 (Red) types a chat message containing -hintseriador as An exact match
      • Player - Player 2 (Blue) types a chat message containing -hintseriador as An exact match
      • Player - Player 3 (Teal) types a chat message containing -hintseriador as An exact match
      • Player - Player 4 (Purple) types a chat message containing -hintseriador as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -hintseriador as An exact match
      • Player - Player 6 (Orange) types a chat message containing -hintseriador as An exact match
      • Player - Player 7 (Green) types a chat message containing -hintseriador as An exact match
      • Player - Player 8 (Pink) types a chat message containing -hintseriador as An exact match
      • Player - Player 9 (Gray) types a chat message containing -hintseriador as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -hintseriador as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -hintseriador as An exact match
      • Player - Player 12 (Brown) types a chat message containing -hintseriador as An exact match
    • Conditions
    • Actions
      • Game - Display to (All allies of (Triggering player)) for 30.00 seconds the text: When you control Er...
 
Last edited:
Status
Not open for further replies.
Top