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

Status
Not open for further replies.
Level 4
Joined
May 10, 2012
Messages
55
Hi Hive,
I'm making a Hero Defense map, and I want to make a trigger when:

1 minute elapses to spawn units in some regions...
and when all units are dead, a count down timer appears and when 30 sec elapse another wave spawns and so on... Can any one help me?

+REP for the helper
 
Level 2
Joined
Jun 15, 2012
Messages
20
Hi Hive,
I'm making a Hero Defense map, and I want to make a trigger when:

1 minute elapses to spawn units in some regions...
and when all units are dead, a count down timer appears and when 30 sec elapse another wave spawns and so on... Can any one help me?

+REP for the helper

not sure how much experience u have with triggers but i can throw a simple summary on how the trigger would work but i would have to mess around with the trigger editor to get an exact trigger for you.

so basically the event would be elapse game time 1 minute of game time. then the action where u create the units in the region.

idk how timers exactly work but a probably less efficient way to do it is after 1 minute of game time have a trigger do an action where it turns on a trigger.
then thats where the trigger with the event for every 30 seconds of game time, comes into play. in the action you can have as many if/then/else statements for how ever many regions you are spawning creeps and have each condition be if no units(or creeps) are in region and then the action stating to spawn w.e u want in the region.

i probably didnt explain that very well but im sure someone else has a more efficient way of doing it but i thought i would get you started
 
Level 1
Joined
Jun 20, 2012
Messages
4
To be honest not sure how well this will work.. but i tried :/

But it should be similar to this.
  • Time
    • Events
      • Time - Elapsed game time is 60.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of CreepSpawn <gen>) facing Default building facing degree
  • Units1
    • Events
      • Unit - A unit enters CreepSpawn <gen>
    • Conditions
      • ((Triggering unit) is A ground unit) Equal to True
    • Actions
      • Unit - Order (Entering unit) to Move To (Center of WhereTheCreepsGo <gen>)
  • Units2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to (Last created unit)
    • Actions
      • Countdown Timer - Start asd as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title UrTitleHere
      • Countdown Timer - Show (Last created timer window)
 
Level 2
Joined
Jun 15, 2012
Messages
20
To be honest not sure how well this will work.. but i tried :/

But it should be similar to this.
  • Time
    • Events
      • Time - Elapsed game time is 60.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of CreepSpawn <gen>) facing Default building facing degree
  • Units1
    • Events
      • Unit - A unit enters CreepSpawn <gen>
    • Conditions
      • ((Triggering unit) is A ground unit) Equal to True
    • Actions
      • Unit - Order (Entering unit) to Move To (Center of WhereTheCreepsGo <gen>)
  • Units2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to (Last created unit)
    • Actions
      • Countdown Timer - Start asd as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title UrTitleHere
      • Countdown Timer - Show (Last created timer window)

well i cant test any triggers out for a few weeks so i cant confirm anything but i see a few things that might be wrong.
for one it might be safer to change the condition that reads Triggering Unit to Entering Unit is equal to a ground unit.
for the condition on the last trigger you may want to change to last created unit in CreepSpawn and last created unit is owned by player one. juss to make sure any other creation stuff doesnt set off this trigger
 
Level 7
Joined
Oct 16, 2010
Messages
194
For the Spawning you can use this. I tried my best to make it understandable. If you still dont understand please PM me.

-As an example i'm using Player 12(Brown) as the owner of the creeps.
-As an example i'm using Footmen and Peasant as the creeps (footmen will be the the wave last round and the Peasant will be the next wave).
-As an example i'm using Ex as the timer Variable.
-As an example i'm using ExWindow to save the timer window.

  • Spawn Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Number of living Footman units owned by Player 12 (Brown)) Equal to 0
    • Actions
      • -------- To clear the old timer created it you already have the timer running. --------
      • Countdown Timer - Destroy ExWindow
      • -------- ---------------------------------------------- --------
      • -------- Starts the timer to wait for the next round --------
      • Countdown Timer - Start Ex as a One-shot timer that will expire in 30.00 seconds
      • -------- ---------------------------------------------- --------
      • -------- Creates the timer window(To display the timer) --------
      • Countdown Timer - Create a timer window for (Last started timer) with title Next Wave
      • -------- ---------------------------------------------- --------
      • -------- Saves the timer window to make it easier to clear it later. --------
      • Set ExWindow = (Last created timer window)
      • -------- ---------------------------------------------- --------
      • -------- Shows the timer window --------
      • Countdown Timer - Show ExWindow
      • -------- ---------------------------------------------- --------
  • Timer Expires
    • Events
      • Time - Ex expires
    • Conditions
    • Actions
      • Unit - Create 1 Peasant for Player 12 (Brown) at "Spawning Point" facing Default building facing degrees
Edit: This should have been posted on World Editor Help Zone

If this helped you click this: Add Reputation
 
Last edited:
Status
Not open for further replies.
Top