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

please Help! how do i make a random play be picked for this?

Status
Not open for further replies.
Level 3
Joined
Feb 19, 2009
Messages
24
please help! i was wandering, say if there are 8 people on a team, how do i make a RANDOM one be (for example) the tagger, Randomly chosen in game? Please help.
 
Level 4
Joined
Mar 24, 2008
Messages
87
Creat a trigger, with an action using players, select the players you want by "player Index (random number between 1 and numbers of players matching (Matching player = Plays))"

If you don't understand i'll make a trigger myself to show you.
 
Level 15
Joined
Oct 16, 2010
Messages
942
Create a random integer from 1-8 and then use the player index to refer to that player.

If you want a more detailed explanation then that you'r going to have to explain more exactly what a "tagger" is (what special attributes are you giving to this random player?)
 
Level 11
Joined
Aug 6, 2009
Messages
697
Do you mean something like this?
  • Actions
    • Player Group - Pick every player in (Player group((Random player from (All players)))) and do (Actions)
      • Loop - Actions
        • Game - Display to (All players) the text: ((Name of (Picked player)) + is the tagger.)
        • Unit - Create 1 tagger for (Picked player) at (Center of (Playable map area)) facing Default building facing degrees
 
You should try this...Random is an 'integer'

  • Random Player
    • Events
      • Time - Every 0.00 seconds of game time
    • Conditions
    • Actions
      • Set Random = (Random integer number between 1 and 8)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Random Equal to 1
        • Then - Actions
          • Unit - Create 1 TAGGER for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 2
            • Then - Actions
              • Unit - Create 1 TAGGER for Player 2 (Blue) at (Center of (Playable map area)) facing Default building facing degrees
            • Else - Actions
  • AND SO ON.....
 
Status
Not open for further replies.
Top