Nivius
TH.net Regular
- Reaction score
- 5
okay so this is the code for chosing a hero, for the "black" team (same code but for white exist, but then players 1-5)
only 1 player on each team shuld be abel to use 1 kind of this hero
also, it shuld post the text "~sorry its already taken by your team~" ONLY to the user that cant pick it
so lets say a player in white have chosen this noble knight before, it shuldnt say anything and the black team can chose it.
if other black have chosen it, and a white walks up it shuld not say taken blabla, it shuldnt do anything, and shuld contine whit the white version of this trigger
only 1 player on each team shuld be abel to use 1 kind of this hero
also, it shuld post the text "~sorry its already taken by your team~" ONLY to the user that cant pick it
so lets say a player in white have chosen this noble knight before, it shuldnt say anything and the black team can chose it.
if other black have chosen it, and a white walks up it shuld not say taken blabla, it shuldnt do anything, and shuld contine whit the white version of this trigger
Trigger:
- BChose Noble
- Events
- Unit - A unit enters Reg Noble Knight <gen>
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- ((Owner of (Triggering unit)) controller) Equal to (Player 6 (Orange) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 7 (Green) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 8 (Pink) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 9 (Gray) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 10 (Light Blue) controller)
- Conditions
- ((Unit-type of (Triggering unit)) Equal to Wisp choser) and (Black_Pick_Taken[1] Equal to 0)
- Or - Any (Conditions) are true
- Then - Actions
- Set Point = (Random point in Hero Spawn Area <gen>)
- Set Black_Pick_Taken[1] = 1
- Unit - Create 1 Noble Knight for (Owner of (Triggering unit)) at Point facing Default building facing degrees
- Selection - Select (Last created unit) for (Owner of (Last created unit))
- Camera - Pan camera for (Owner of (Triggering unit)) to Point over 0.00 seconds
- Custom script: call RemoveLocation(udg_Point)
- Unit - Remove (Triggering unit) from the game
- Game - Display to (All players) the text: ((Name of (Triggering player)) + (Chose + (Name of (Targeted unit))))
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Black_Pick_Taken[1] Not equal to 0
- Or - Any (Conditions) are true
- Conditions
- ((Owner of (Triggering unit)) controller) Equal to (Player 6 (Orange) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 7 (Green) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 8 (Pink) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 9 (Gray) controller)
- ((Owner of (Triggering unit)) controller) Equal to (Player 10 (Light Blue) controller)
- Conditions
- Then - Actions
- Game - Display to (All players matching (((Player 6 (Orange) controller) Equal to User) or (((Player 7 (Green) controller) Equal to User) or (((Player 8 (Pink) controller) Equal to User) or (((Player 9 (Gray) controller) Equal to User) or ((Player 10 (Light Blue) controller) Equal to User) the text: Sorry, this unit ha...
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events