Affliction
New Member
- Reaction score
- 0
Trigger:
- First night
- Events
- Game - The in-game time of day becomes Equal to 17.90
- Conditions
- Actions
- Set AllPlayers = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))
- Set Chosen_Player = (Random player from AllPlayers)
- Player - Make Chosen_Player treat Player 12 (Brown) as an Ally with shared vision
- Player - Make Player 12 (Brown) treat Chosen_Player as an Ally with shared vision and full shared units
- Set Temp_Group = (Units owned by Chosen_Player matching (((Unit-type of (Triggering unit)) Equal to Marksman) or (((Unit-type of (Triggering unit)) Equal to Footman) or ((Unit-type of (Triggering unit)) Equal to Mortar Team))))
- Unit Group - Pick every unit in Temp_Group and do (Set Chosen_Unit = (Picked unit))
- Custom script: call DestroyGroup (udg_Temp_Group)
- Set Temp_Group = (Units owned by Player 12 (Brown) of type Evils)
- Unit Group - Pick every unit in Temp_Group and do (Set Chosen_Hero = (Picked unit))
- Custom script: call DestroyGroup (udg_Temp_Group)
- Wait 3.00 seconds
- Events
The problem I'm having is with
Trigger:
- Set Temp_Group = (Units owned by Chosen_Player matching (((Unit-type of (Triggering unit)) Equal to Marksman) or (((Unit-type of (Triggering unit)) Equal to Footman) or ((Unit-type of (Triggering unit)) Equal to Mortar Team))))
What I need it to do, is set Temp_Group to whichever one of those three units exists for the chosen player.
However, since they can only have -1- of those and are then unable to get the other two... It's like the game selects one at random, regardless of wether the player has the unit or not.
Could someone help me get it to work properly? This one variable being broken ruins the whole trigger.