• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[TRIGGER]enter-exit houses

Status
Not open for further replies.
Level 9
Joined
Jul 20, 2009
Messages
427
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)
      • 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)
      • 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)
      • 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)
      • 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)
      • Custom script: call DestroyGroup (udg_Temp_Group)
      • Custom script: call DestroyGroup (udg_Temp_Group2)
  • 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)
      • 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)
      • 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)
      • 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)
      • 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)
      • Custom script: call DestroyGroup (udg_Temp_Group)
      • Custom script: call DestroyGroup (udg_Temp_Group2)
 
Status
Not open for further replies.
Top