• 🏆 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!

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
941
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
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
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