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

Invulnerable tower

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Set all towers into unit array variable.
Make new trig and cr8 new int variable and when unit dies, check if the unit type of dying unit is "other tower", and set that int variable to int variable + 1 and then check in ITE if that int is 5, then make "tower invurnerable" vurnerable
 
Set the towers to invul at start of the game.

Create a trigger which fires when a unit dies. Check if type of dying unit equals your tower. (and maybe also need to check if owner of dying unit is this specific player)

Then as action you increase a counter (integer variable) by 1. If your counter equals 5 --> use the "Unit - Make Unit vulnerable" action to make your towers attackable.
 
Level 18
Joined
May 11, 2012
Messages
2,103
Here you go

  • Set Up
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Towers[1] = Cannon Tower 0004 <gen>
      • Set Towers[2] = Cannon Tower 0003 <gen>
      • Set Towers[3] = Cannon Tower 0002 <gen>
      • Set Towers[4] = Cannon Tower 0001 <gen>
      • Set Towers[5] = Cannon Tower 0000 <gen>
      • Set Towers[6] = Cannon Tower 0005 <gen>
      • Unit - Make Towers[6] Invulnerable
  • Tower Dying
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Towers[1]
          • (Triggering unit) Equal to Towers[2]
          • (Triggering unit) Equal to Towers[3]
          • (Triggering unit) Equal to Towers[4]
          • (Triggering unit) Equal to Towers[5]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CountInt Equal to 5
        • Then - Actions
          • Unit - Make Towers[6] Vulnerable
        • Else - Actions
          • Set CountInt = (CountInt + 1)
 
Status
Not open for further replies.
Top