• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger Help

Status
Not open for further replies.
Level 2
Joined
Mar 6, 2019
Messages
11
Hello. I started making a map and got stuck with the triggers. I try to describe the problem as good as I can.

We have 5 ogres next to each other. What I want is to make a trigger wich would move/pan my camera from point A to B if they are all dead no matter in wich order did they die. So like im in the left corner with the camera after I kill the 5 ogre without any order so I can kill them like 1-4-3-5-2 or 4-3-2-5-1 after all 5 dead my camera moves to the right corner for example.
 
Level 7
Joined
Apr 17, 2017
Messages
316
  • ogre init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ogre_counter = 5
  • ogre death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Ogre Warrior
    • Actions
      • Set ogre_counter = (ogre_counter - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ogre_counter Equal to 0
        • Then - Actions
          • -------- for the last player killing the the last ogre --------
          • Set temploc = (Center of (Playable map area))
          • Camera - Pan camera for (Owner of (Killing unit)) to temploc over 0.00 seconds
          • -------- for multiple players do this: --------
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Camera - Pan camera for (Picked player) to temploc over 0.00 seconds
          • Custom script: call RemoveLocation(udg_temploc)
        • Else - Actions
Additionally if you have more than 5 ogres in your map, you need to add them to a unit group.
 
Status
Not open for further replies.
Top