• 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.

Hero defense trigger event

Status
Not open for further replies.
Level 4
Joined
Feb 24, 2018
Messages
71
Hello there ! I'm making a custom hero defense map and I would like an event trigger similar to X hero siege when let's say for example after 10 minutes every wave creep freezes and doesn't attack anymore and every player's hero gets teleported in a region where they have to survive against a unit for a few minutes and they receive a reward(gold/items).After the event is over or they die they get teleported back to base.
If anyone has time to help me out it would be awesome ! Thanks in advance
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
well like i said there are manny different ways of doing it depending on your map and how things work. (your hero revival, unit spawns ect)

heres the basics not including the hero revival assuming the creep waves are player brown

  • event start
    • Events
      • Time - Elapsed game time is 600.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn off spawns <gen>
      • Unit - Pause all units
      • Set temp_p = (Center of event <gen>)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to temp_p
          • Unit - Unpause (Picked unit)
      • Custom script: call RemoveLocation(udg_temp_p)
      • Countdown Timer - Start Event_timer as a One-shot timer that will expire in 300.00 seconds
      • Set temp_p = (Center of boss spawn <gen>)
      • Unit - Create 1 Crypt Lord for Player 12 (Brown) at temp_p facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_temp_p)
  • event end
    • Events
      • Time - Event_timer expires
    • Conditions
    • Actions
      • Trigger - Turn on spawns <gen>
      • Unit - Unpause all units
      • Set temp_p = (Center of Event finish <gen>)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in event <gen> matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to temp_p
          • Item - Create Claws of Attack +15 at temp_p
          • Hero - Give (Last created item) to (Picked unit)
          • Player - Add 1000 to (Owner of (Picked unit)) Current gold
      • Custom script: call RemoveLocation(udg_temp_p)
 
Status
Not open for further replies.
Top