I have this trigger which gives lumber to players if they have the specific building.
But, what i wanna do is add a set of triggers, which makes sure that each person only have one Lumber Base. (They are NOT allowed to have one LB1 and one LB2).
I have tried, but can't find the solution, to make sure each person only have 1 Lumber Base. How can this be done?
Trigger:
- Lumber Bases
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- Set Temp_GroupLB1 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Lumber Base 1) and (((Owner of (Matching unit)) Equal to (Player((Integer A)))) and (((Matching unit) is alive) Equal to True))))
- Player - Add ((Number of units in Temp_GroupLB1) x 25) to (Player((Integer A))) Current lumber
- Custom script: call DestroyGroup( udg_Temp_GroupLB1 )
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- Set Temp_GroupLB2 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Lumber Base 2) and (((Owner of (Matching unit)) Equal to (Player((Integer A)))) and (((Matching unit) is alive) Equal to True))))
- Player - Add ((Number of units in Temp_GroupLB2) x 38) to (Player((Integer A))) Current lumber
- Custom script: call DestroyGroup( udg_Temp_GroupLB2 )
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- Set Temp_GroupLB3 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Lumber Base 3) and (((Owner of (Matching unit)) Equal to (Player((Integer A)))) and (((Matching unit) is alive) Equal to True))))
- Player - Add ((Number of units in Temp_GroupLB3) x 50) to (Player((Integer A))) Current lumber
- Custom script: call DestroyGroup( udg_Temp_GroupLB3 )
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- Set Temp_GroupLB4 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Lumber Base 4) and (((Owner of (Matching unit)) Equal to (Player((Integer A)))) and (((Matching unit) is alive) Equal to True))))
- Player - Add ((Number of units in Temp_GroupLB4) x 75) to (Player((Integer A))) Current lumber
- Custom script: call DestroyGroup( udg_Temp_GroupLB4 )
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- Set Temp_GroupLB5 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Lumber Base 5) and (((Owner of (Matching unit)) Equal to (Player((Integer A)))) and (((Matching unit) is alive) Equal to True))))
- Player - Add ((Number of units in Temp_GroupLB5) x 100) to (Player((Integer A))) Current lumber
- Custom script: call DestroyGroup( udg_Temp_GroupLB5 )
- Loop - Actions
- For each (Integer A) from 1 to 10, do (Actions)
- Loop - Actions
- Set Temp_GroupLB6 = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Lumber Base 6) and (((Owner of (Matching unit)) Equal to (Player((Integer A)))) and (((Matching unit) is alive) Equal to True))))
- Player - Add ((Number of units in Temp_GroupLB6) x 150) to (Player((Integer A))) Current lumber
- Custom script: call DestroyGroup( udg_Temp_GroupLB6 )
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Events
But, what i wanna do is add a set of triggers, which makes sure that each person only have one Lumber Base. (They are NOT allowed to have one LB1 and one LB2).
I have tried, but can't find the solution, to make sure each person only have 1 Lumber Base. How can this be done?