• 🏆 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] summon trigger

Status
Not open for further replies.
Level 3
Joined
Jun 27, 2008
Messages
34
i need to make a trigger that when a player (7 players total) types -summon while he is in the battle area, the units in the store area moves to the hero's (main unit) postiotion. i tried this but it didnt work:

  • Summon Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -summon as An exact match
    • Conditions
    • Actions
      • Set TempGroup2 = (Units in (Playable map area) owned by Player 1 (Red))
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to False
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Position of Jack Longshanks 0122 <gen>)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup2)
i will +rep thanks!
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Ok my following trigger requires 1 thing:

1) Each Player just control only 1 Hero!

  • Summon
    • Events
      • Player - Player 1 (Red) types a chat message containing -summon as An exact match
      • Player - Player 2 (Blue) types a chat message containing -summon as An exact match
      • Player - Player 3 (Teal) types a chat message containing -summon as An exact match
      • Player - Player 4 (Purple) types a chat message containing -summon as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -summon as An exact match
      • Player - Player 6 (Orange) types a chat message containing -summon as An exact match
      • Player - Player 7 (Green) types a chat message containing -summon as An exact match
    • Conditions
    • Actions
      • Set TempGrp2 = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Set TempGrp = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to False))
      • Set TempLoc = (Position of (Random unit from TempGrp2))
      • Unit Group - Pick every unit in TempGrp and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to TempLoc
      • Custom script: call DestroyGroup(udg_TempGrp)
      • Custom script: call DestroyGroup(udg_TempGrp2)
      • Custom script: call RemoveLocation(udg_TempLoc)
Edit: And if you want make sure that the hero is in the battle area, than create a region inside the battle region and use this trigger:
  • Summon
    • Events
      • Player - Player 1 (Red) types a chat message containing -summon as An exact match
      • Player - Player 2 (Blue) types a chat message containing -summon as An exact match
      • Player - Player 3 (Teal) types a chat message containing -summon as An exact match
      • Player - Player 4 (Purple) types a chat message containing -summon as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -summon as An exact match
      • Player - Player 6 (Orange) types a chat message containing -summon as An exact match
      • Player - Player 7 (Green) types a chat message containing -summon as An exact match
    • Conditions
    • Actions
      • Set TempGrp2 = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Set TempGrp = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to False))
      • Set TempLoc = (Position of (Random unit from TempGrp2))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BattleArea Rect <gen> contains TempLoc) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in TempGrp and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to TempLoc
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGrp)
      • Custom script: call DestroyGroup(udg_TempGrp2)
      • Custom script: call RemoveLocation(udg_TempLoc)
Edit 2: If this with the region is impossible, then make a separate terrain art for the complete battle zone and use:
  • Summon
    • Events
      • Player - Player 1 (Red) types a chat message containing -summon as An exact match
      • Player - Player 2 (Blue) types a chat message containing -summon as An exact match
      • Player - Player 3 (Teal) types a chat message containing -summon as An exact match
      • Player - Player 4 (Purple) types a chat message containing -summon as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -summon as An exact match
      • Player - Player 6 (Orange) types a chat message containing -summon as An exact match
      • Player - Player 7 (Green) types a chat message containing -summon as An exact match
    • Conditions
    • Actions
      • Set TempGrp2 = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Set TempGrp = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to False))
      • Set TempLoc = (Position of (Random unit from TempGrp2))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at TempLoc) Equal to <Terrain>
        • Then - Actions
          • Unit Group - Pick every unit in TempGrp and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to TempLoc
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGrp)
      • Custom script: call DestroyGroup(udg_TempGrp2)
      • Custom script: call RemoveLocation(udg_TempLoc)
Greetings
~ The Bomb King > Dr. Boom
 
Last edited:
Level 3
Joined
Jun 27, 2008
Messages
34
how do u do (BattleArea Rect <gen> contains TempLoc) Equal to True

i looked for temploc in variable tab and it wasn't there... is templock a point or unit
 
Status
Not open for further replies.
Top