- Joined
- Feb 17, 2007
- Messages
- 368
I'm trying to make it so players cant pick 2 of the same hero, but not sure how to do it. I realize this method is wrong but it's what I'm working with right now. Anyone have any idea how to fix this?
-
Actions
-

Set DbzHeroes = (Units in Region 001 <gen>)
-

Unit Group - Pick every unit in DbzHeroes and do (Actions)
-


Loop - Actions
-
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



(Region 078 <gen> contains (Picked unit)) Equal to True
-
-


Then - Actions
-



Set FloatTxtGroup = (Player group((Triggering player)))
-



Game - Display to FloatTxtGroup for 5.00 seconds the text: This hero has alrea...
-



Custom script: call DestroyForce(udg_FloatTxtGroup)
-
-


Else - Actions
-



Cinematic - Clear the screen of text messages for (All players matching (Picking_Hero[(Player number of (Triggering player))] Equal to True))
-



Set DBZStartSpot = (Center of Region 095 <gen>)
-



Set Picking_Hero[(Player number of (Triggering player))] = False
-



Set Hero_Selected[(Player number of (Triggering player))] = True
-



Visibility - Create an initially Enabled visibility modifier for (Triggering player) emitting Visibility across Region 078 <gen>
-



Set VisibleArray[(Player number of (Triggering player))] = (Last created visibility modifier)
-



Unit - Create 1 Current_Hero[(Player number of (Triggering player))] for (Triggering player) at DBZStartSpot facing Default building facing degrees
-



Custom script: call RemoveLocation (udg_DBZStartSpot)
-



Game - Display to (All players) for 5.00 seconds the text: (CounterColor[(Player number of (Triggering player))] + ((Name of (Triggering player)) + (|cff4169e1 has selected a|r + (Proper name of (Last created unit)))))
-



Player - Set name of (Triggering player) to (player_name_raw[(Player number of (Triggering player))] + (( ( + (Proper name of (Last created unit))) + (CounterColor[(Player number of (Triggering player))] + ))))
-



Unit Group - Add (Last created unit) to Hero_Selected_Unit_Group
-



Set Players_Heroes[(Player number of (Triggering player))] = (Last created unit)
-



Selection - Select (Last created unit) for (Triggering player)
-



Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds
-



Camera - Set (Triggering player)'s camera Height Offset to 400.00 over 0.00 seconds
-



Player Group - Remove (Triggering player) from Hero_Selecting_Group
-



Player Group - Remove (Triggering player) from RepickHeroSelecting
-



Player Group - Add (Triggering player) to Hero_Selected_Group
-
-
-
Last edited:






