-Brainiac-
New Member
- Reaction score
- 7
Hi there, my random hero pick trigger works fine just that I spawn all random heroes to One point ( And since I have two teams with heroes I want them to spawn on two different locations.. For my random hero pick trigger I followed a Tut by Ryoko: http://world-editor-tutorials.thehelper.net/herotavern.php )
So far i'm not an expert on making triggers but I had the idea to dublicate the if then else trigger with a condition that the players are an ally of player 1 and 5 (1/4 team 1 5/8 team 2)
That's it, don't know if my idea fits here. If not someone with a suggestion?
Regards
So far i'm not an expert on making triggers but I had the idea to dublicate the if then else trigger with a condition that the players are an ally of player 1 and 5 (1/4 team 1 5/8 team 2)
Trigger:
- Random Hero Pick
- Events
- Player - Player 1 (Red) types a chat message containing -random as An exact match
- Player - Player 2 (Blue) types a chat message containing -random as An exact match
- Player - Player 3 (Teal) types a chat message containing -random as An exact match
- Player - Player 4 (Purple) types a chat message containing -random as An exact match
- Player - Player 5 (Yellow) types a chat message containing -random as An exact match
- Player - Player 6 (Orange) types a chat message containing -random as An exact match
- Player - Player 7 (Green) types a chat message containing -random as An exact match
- Player - Player 8 (Pink) types a chat message containing -random as An exact match
- Conditions
- Actions
- Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
- Game - Display to (All players) the text: Hello ! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in TempGroup) Equal to 0
- Then - Actions
- Game - Display to (All players) the text: Hello ! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
- Set Random_Hero = (Random integer number between 1 and Random_Count)
- Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Triggering player) at (Center of Heroes North <gen>) facing Default building facing degrees
- Game - Display to (All players) the text: (A player has randomed + (Name of (Last created unit)))
- Selection - Select (Last created unit) for (Triggering player)
- Player - Add -425 to (Triggering player) Current gold
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Player - Make (Unit-type of (Last created unit)) Unavailable for training/construction by (Picked player)
- Loop - Actions
- Set Random_Data[Random_Hero] = Random_Count
- Set Random_Count = (Random_Count - 1)
- Else - Actions
- If - Conditions
- Custom script: call DestroyGroup(udg_TempGroup)
- Events
That's it, don't know if my idea fits here. If not someone with a suggestion?
Regards