I made this trigger that automatically orders citizens to enter and exit houses..I would like to ask how can i Improve the trigger.Please check for leaks,and also if ever there's a better way to do this please post the triggers..In my map there would be lots of citizens so I want to make this trigger lagless and leakless as possible..thanks
-
enter house day rate
-
Events
- Time - entertimer expires
- Conditions
-
Actions
- Set Temp_Group = (Random 1 units from (Units of type Citizen kid1))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to House) or (((Unit-type of (Matching unit)) Equal to House - Level 2) or (((Unit-type of (Matching unit)) Equal to House - Level 3) or (((Unit-type of (Match
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Board (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type Citizen kid2))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to House) or (((Unit-type of (Matching unit)) Equal to House - Level 2) or (((Unit-type of (Matching unit)) Equal to House - Level 3) or (((Unit-type of (Match
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Board (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type Citizen man1))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to House) or (((Unit-type of (Matching unit)) Equal to House - Level 2) or (((Unit-type of (Matching unit)) Equal to House - Level 3) or (((Unit-type of (Match
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Board (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type Citizen man2))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to House) or (((Unit-type of (Matching unit)) Equal to House - Level 2) or (((Unit-type of (Matching unit)) Equal to House - Level 3) or (((Unit-type of (Match
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Board (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type Citizen woman))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to House) or (((Unit-type of (Matching unit)) Equal to House - Level 2) or (((Unit-type of (Matching unit)) Equal to House - Level 3) or (((Unit-type of (Match
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Board (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
-
Events
-
exit house
-
Events
- Time - exitimer expires
- Conditions
-
Actions
- Set Temp_Group = (Random 3 units from (Units of type House))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to Citizen kid1) or (((Unit-type of (Matching unit)) Equal to Citizen kid2) or (((Unit-type of (Matching unit)) Equal to Citizen man1) or (((Unit-type of (Matc
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Unload (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type House2))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to Citizen kid1) or (((Unit-type of (Matching unit)) Equal to Citizen kid2) or (((Unit-type of (Matching unit)) Equal to Citizen man1) or (((Unit-type of (Matc
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Unload (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type House3))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to Citizen kid1) or (((Unit-type of (Matching unit)) Equal to Citizen kid2) or (((Unit-type of (Matching unit)) Equal to Citizen man1) or (((Unit-type of (Matc
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Unload (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type House - Level 2))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to Citizen kid1) or (((Unit-type of (Matching unit)) Equal to Citizen kid2) or (((Unit-type of (Matching unit)) Equal to Citizen man1) or (((Unit-type of (Matc
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Unload (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
- Set Temp_Group = (Random 1 units from (Units of type House - Level 3))
- Set Temp_Group2 = (Random 1 units from (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to Citizen kid1) or (((Unit-type of (Matching unit)) Equal to Citizen kid2) or (((Unit-type of (Matching unit)) Equal to Citizen man1) or (((Unit-type of (Matc
-
Unit Group - Pick every unit in Temp_Group and do (Actions)
-
Loop - Actions
- Unit - Order (Picked unit) to Unload (Random unit from Temp_Group2)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group2)
-
Events