Making repicked players unit available again

Nivius

TH.net Regular
Trigger:
  • Repick
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
      • Player - Player 6 (Orange) types a chat message containing -repick as An exact match
      • Player - Player 7 (Green) types a chat message containing -repick as An exact match
      • Player - Player 8 (Pink) types a chat message containing -repick as An exact match
      • Player - Player 9 (Gray) types a chat message containing -repick as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Random 1 units from (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Last created unit))) + Repicked)
      • Set Point = (Center of Wisp Spawn Area <gen>)
      • Camera - Pan camera for (Triggering player) to Point over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point)
      • Set Point = (Center of Wisp Spawn Area <gen>)
      • Unit - Create 1 Wisp choser for (Triggering player) at Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point)
      • Selection - Select (Last created unit) for (Owner of (Last created unit))


this is the script i have now, and atm it dont have any way of "renenbleing" a unit...

info that is good to know:
when a player choses a hero
White_Pick_Taken[1] = that players number

1="Noble Knight"
2="Rampaging monster"
3="Murloc"
and so on

so i need a way of getting "triggering player"s number and "search?" for what White_Pick_Taken[x] its in, then make it 0 again
(( think i can get number by get (player number of (owner of (triggering unit)))

im not realy intressted in a 36 IF ( White_Pick_Taken[1] = player number ) and so on
 

Nivius

TH.net Regular
Trigger:
  • For each (Integer White_Pick_Taken[1]) from 1 to RepickLoop[1], do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • White_Pick_Taken[RepickLoop[1]] Equal to (Player number of (Owner of (Last created unit)))
        • Then - Actions
          • Set White_Pick_Taken[RepickLoop[1]] = 0
          • -------- gona be removed if the loop works --------
          • Custom script: exitwhen true
          • -------- does it? --------
        • Else - Actions
          • Set RepickLoop[1] = (RepickLoop[1] + 1)


that shuld do the trick? can somone comfirm?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

    Staff online

    • Ghan
      Administrator - Servers are fun

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top