R
Rollo123
Guest
I have used a trigger from Ryoko Hero Tavern and it isnt working right
All Random Command
Events
Player - Player 2 (Blue) types a chat message containing -ar as An exact match
Conditions
Actions
Trigger - Turn off Random Command <gen>
For each (Integer A) from 2 to 4, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) slot status) Equal to Is playing
Then - Actions
Set Random_Hero = (Random integer number between 1 and Random_Count)
Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
Selection - Select (Last created unit) for (Owner of (Last created unit))
Game - Display to (All players) the text: (A player has randomed + (Name of (Last created unit)))
Set Random_Data[Random_Hero] = Random_Count
Set Random_Count = (Random_Count - 1)
Else - Actions
Do nothing
It gives the same players the same hero every time. Can anyone see anything wrong? Thanks
All Random Command
Events
Player - Player 2 (Blue) types a chat message containing -ar as An exact match
Conditions
Actions
Trigger - Turn off Random Command <gen>
For each (Integer A) from 2 to 4, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) slot status) Equal to Is playing
Then - Actions
Set Random_Hero = (Random integer number between 1 and Random_Count)
Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
Selection - Select (Last created unit) for (Owner of (Last created unit))
Game - Display to (All players) the text: (A player has randomed + (Name of (Last created unit)))
Set Random_Data[Random_Hero] = Random_Count
Set Random_Count = (Random_Count - 1)
Else - Actions
Do nothing
It gives the same players the same hero every time. Can anyone see anything wrong? Thanks


