• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

[Trigger] Respawning, patrolling, changing garrisons

Status
Not open for further replies.
Level 67
Joined
Dec 23, 2013
Messages
1,429
I'm ready to bet this is going to be one of the most complicated, convoluted, arduous scripts ever written.
Maybe even as crazy as the level-up pop-up script.

I've been working on a map which has 5 Fortresses, each one with a boss, and somewhere between 20-30 guards, some of which need to patrol around the keep.

I've got a basic assault script working, it looks like this:
  • Evil Isendeep Wave Spawn
    • Events
      • Time - Every 180.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 3 Ongbúrz Soldier (Wave Mob) for Player 1 (Red) at (Center of Gramsfoot Patrol Spawn <gen>) facing Default building facing degrees
      • Unit - Create 4 Ongbúrz Archer (Wave Mob) for Player 1 (Red) at (Center of Gramsfoot Patrol Spawn <gen>) facing Default building facing degrees
      • Unit Group - Order (Units in Gramsfoot Patrol Spawn <gen>) to Attack-Move To (Center of Evil Move 2 <gen>)
And they move from waypoint to waypoint until they get to the boss, and either die, or win and run to a spot to be removed.
When the boss dies, the script that spawns these guys turns off, and another one for the opposing AI army turns on, sending waves to reclaim the fortress (by killing the newly spawned boss)

While I've worked out how to remove the losing side's garrison after the boss dies with this script:
  • Isendeep Taken by Creeps
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Captain-General Meldún
    • (Isendeep)
      • Actions
        • Trigger - Turn on Isendeep Ongburz Remove <gen>
        • Trigger - Turn on Good Isendeep Wave Spawn <gen>
        • Trigger - Turn off Evil Isendeep Wave Spawn <gen>
        • Trigger - Turn off Isendeep Coldfells Remove <gen>
        • Unit Group - Pick every unit in (Units in Isendeep Garrison 1 <gen> owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
        • Unit Group - Pick every unit in (Units in Isendeep Garrison 2 <gen> owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
        • Unit Group - Pick every unit in (Units in Isendeep Garrison 3 <gen> owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
        • Unit - Create 1 Tyrant Bûrzgoth
    • (Isendeep) for Player 1 (Red) at (Center of Isendeep Boss Waypoint <gen>) facing Default building facing degrees
      • Game - Display to (All allies of Player 1 (Red).) for 15.00 seconds the text: |cffff7d00Angmar-û...
      • Game - Display to (All allies of Player 2 (Blue).) for 15.00 seconds the text: |cffff7d00Retreat! ...
I haven't figured out how to create a new garrison that can replenish itself (90s after a guard dies, it respawns in it's original spot) let alone make it so certain guys who get created begin to patrol.

Example:
Noname.png

- I need these Red guys to respawn in the same position they're standing in here, 90s after they've been killed, IF unit-type Captain-General Meldún is alive on the map
&
- I need these Yellow guys to patrol to X, even after they've been killed and respawn, IF unit-type Captain-general Meldun is alive on the map
&
- I need both Red and Yellow to be replaced by Ongburz Warriors/Archers for player [Red] who move along the same patrol paths, and respawn when killed, IF unit-type Tyrant Bûrzgoth is alive on the map

I'm hoping to accomplish all of this through the GUI, cursed though it be from what I hear
 
Status
Not open for further replies.
Top