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

[Trigger] Picking a player

Status
Not open for further replies.
Level 5
Joined
Dec 18, 2007
Messages
205
if you want to do one single action, then use something like this:

  • Player - Set (Random player from (All players matching (((Matching player) slot status) Equal to Is Playing))) Current Gold to 750
Instead of All Players use your target group. Do the same with the function below.

If you want to do more than one action use a variable and then use that variable for all actions:

  • Set Player = (Random player from (All players matching (((Matching player) slot status) equal to is playing)))
If player-group could be empty use s.th. like this:

  • Custom script: if udg_Player == null then
  • Game - Display to (All players) the text: No Player!
  • Skip remaining actions
  • Custom script: endif
 
Level 20
Joined
Oct 21, 2006
Messages
3,230
  • Set PlayerGroup1 = (All players controlled by a User player)
  • Set PlayerGroup2 = (Player group((Random player from PlayerGroup1)))
  • Player Group - Pick every player in PlayerGroup2 and do (Actions)
    • Loop - Actions
  • Custom script: call DestroyForce(udg_PlayerGroup1)
  • Custom script: call DestroyForce(udg_PlayerGroup2)
 
Status
Not open for further replies.
Top