- Joined
- Jul 17, 2006
- Messages
- 145
alright here is what i have so far:
this works fine, but when used there is a possibility that someone will get the same hero as someone else. is there any way to prevent that?
-
Actions
- Set Random_Hero = 10
- Set Hero_Array[1] = Captain Rodger
- Set Hero_Array[2] = Captain Will
- Set Hero_Array[3] = Captain Hapo
- Set Hero_Array[4] = Captain Bonez
- Set Hero_Array[5] = Captain Nick
- Set Hero_Array[6] = Captain Kasith
- Set Hero_Array[7] = Captain Henry
- Set Hero_Array[8] = Captain Neron
- Set Hero_Array[9] = Captian Eritheg
- Set Hero_Array[10] = Captian Gemros
-
RC command
-
Events
- Player - Player 3 (Teal) types a chat message containing -rc as An exact match
-
Conditions
- CommandLock Equal to False
-
Actions
- Game - Display to (All players) the text: |c0000FF00Random Ca...
-
For each (Integer A) from 3 to 12, 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 Hero_Count)
- Unit - Create 1 Hero_Array[Random_Hero] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Last created unit)) is an ally of Player 1 (Red)) Equal to True
-
Then - Actions
- Unit - Move (Last created unit) instantly to (Center of SouthRespawn <gen>)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Last created unit)) is an ally of Player 2 (Blue)) Equal to True
-
Then - Actions
- Unit - Move (Last created unit) instantly to (Center of NorthRespawn <gen>)
- Else - Actions
-
If - Conditions
- Set Captian[(Player number of (Owner of (Last created unit)))] = (Unit-type of (Last created unit))
- Set PlayerBoat[(Player number of (Owner of (Last created unit)))] = (Last created unit)
- Unit - Remove (Random unit from (Units owned by (Owner of (Last created unit)) of type Hero Selecter)) from the game
- Hero - Create Bowmen Crew and give it to (Last created unit)
- Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 1.00 seconds
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
this works fine, but when used there is a possibility that someone will get the same hero as someone else. is there any way to prevent that?
Last edited by a moderator: