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

Castle gate

Level 1
Joined
Mar 6, 2025
Messages
1
I want to make a gate on a castle just like on the Helms Deep map. One that the player can open and close, but that doesn't reset to max HP or resurrect every time they open and close it. How can I do that? If I make a gate and hook it up to a lever with triggers, it'll open and close just fine. But as soon as the gate takes damage, or even if it's destroyed, the player just has to open and close it again and it's back to full health.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
I want to make a gate on a castle just like on the Helms Deep map. One that the player can open and close, but that doesn't reset to max HP or resurrect every time they open and close it. How can I do that? If I make a gate and hook it up to a lever with triggers, it'll open and close just fine. But as soon as the gate takes damage, or even if it's destroyed, the player just has to open and close it again and it's back to full health.
Your trigger to open it should check if it's dead before doing so. There's a Boolean Comparison condition to check if something is dead.
 
Level 21
Joined
Mar 16, 2008
Messages
955
I think the following solved the problem of the gate being set back to 100% hp. Someone on the Hive forums helped me make a system that solved this problem:

  • Set Sea Gates as Alive
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet GateIsDead_Red = False
  • Port Gate Dies Red
    • Events
      • Destructible - Royal Port Gate (Horizontal) 7764 <gen> dies
    • Conditions
      • DisableGateDies_Red Equal to False
    • Actions
      • Set VariableSet GateIsDead_Red = True
  • Open Port Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -open as An exact match
    • Conditions
      • GateIsDead_Red Equal to False
    • Actions
      • Set VariableSet DisableGateDies_Red = True
      • Destructible - Open Royal Port Gate (Horizontal) 7764 <gen>
      • Set VariableSet DisableGateDies_Red = False
  • Close Port Red
    • Events
      • Player - Player 1 (Red) types a chat message containing -close as An exact match
    • Conditions
      • GateIsDead_Red Equal to False
    • Actions
      • Set VariableSet DisableGateDies_Red = True
      • Destructible - Close Royal Port Gate (Horizontal) 7764 <gen>
      • Set VariableSet DisableGateDies_Red = False
 
Top