BlueMirage
Trust, but doubt.
- Reaction score
- 39
PersonsPerTeam is an integer constant which is decided earlier on in the game. It is either 3, 4 or 6.
Circles is a Unit Group that contains 12 stationary buildings. Each unit has a unique custom value, varying between 1 and 12.
TeamPlayers is a Player Group Array which includes all the players of a specific team.
PlayerHero is the one hero that a specific player owns (One hero per player).
I have a very wierd problem here.
After looping through the Circles group to find a random unit, it sets that unit to a variable and that unit's position to a variable. However, directly after picking every player in TeamPlayers(Integer A), this information is lost and is for some reason set to the center of the map.
I have no idea why this happens. For some reason, it only happens when a player randoms a hero. I have not tried this with multiplayer, so I do not know what will happen with more than 1 hero.
If more information is needed to solve this problem, I'll post the hero picking and randoming triggers as well.
Circles is a Unit Group that contains 12 stationary buildings. Each unit has a unique custom value, varying between 1 and 12.
TeamPlayers is a Player Group Array which includes all the players of a specific team.
PlayerHero is the one hero that a specific player owns (One hero per player).
Trigger:
- Spawn Teams
- Events
- Conditions
- Actions
- Set TempInteger = (Random integer number between 1 and 12)
- For each (Integer A) from 1 to (12 / PersonsPerTeam), do (Actions)
- Loop - Actions
- Unit Group - Pick every unit in Circles and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Custom value of (Picked unit)) Equal to TempInteger
- Then - Actions
- Set TempUnit = (Picked unit)
- Set TempPoint = (Position of TempUnit)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Player Group - Pick every player in TeamPlayers[(Integer A)] and do (Actions)
- Loop - Actions
- Camera - Pan camera for (Picked player) to TempPoint over 0.00 seconds
- Unit - Move PlayerHero[(Player number of (Picked player))] instantly to TempPoint, facing (Center of (Playable map area))
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- The Rest is irrelevant
- Unit Group - Pick every unit in Circles and do (Actions)
- Loop - Actions
I have a very wierd problem here.
After looping through the Circles group to find a random unit, it sets that unit to a variable and that unit's position to a variable. However, directly after picking every player in TeamPlayers(Integer A), this information is lost and is for some reason set to the center of the map.
I have no idea why this happens. For some reason, it only happens when a player randoms a hero. I have not tried this with multiplayer, so I do not know what will happen with more than 1 hero.
If more information is needed to solve this problem, I'll post the hero picking and randoming triggers as well.