• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

How to detect when a gate door is destroyed

Status
Not open for further replies.
Level 5
Joined
Sep 19, 2007
Messages
97
Hi, in my map a builder can make a gate.

When an enemy destroys the gate door, the shell of the gate remains.

I would like to destroy the shell of the gate when the door is destroyed so my builder can make another gate.

How could I do this?
 
Level 5
Joined
Sep 19, 2007
Messages
97
I'm suspicious that a gate dying would trigger a unit death event since it is a destructible.

I already tried the destruction death event and it didn't pick up the gate being destroyed.

I'll give it a try after work and let you know how it goes.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Nah just remove the gate right after it dies and use some special effect on point it died to make it look like destroyed (something like WTF BOOOM :p)
 
Level 5
Joined
Sep 19, 2007
Messages
97
Nah just remove the gate right after it dies and use some special effect on point it died to make it look like destroyed (something like WTF BOOOM :p)

The trouble is, how do you detect a gate has died? It doesn't trigger the destructible death event because the shell of the gate is still there. It doesn't trigger the unit death either.

Gate death didn't trigger this
  • has a destructible died
    • Events
      • Destructible - A destructible within Gate Region 1 <gen> dies
    • Conditions
    • Actions
      • Sound - Play InnerFireBirth <gen>
or this

  • has a destructible died
    • Events
      • Destructible - A destructible within Gate Region 1 <gen> dies
    • Conditions
    • Actions
      • Sound - Play InnerFireBirth <gen>
{EDIT}
pic of the gate
 

Attachments

  • War3 jpeg.jpg
    War3 jpeg.jpg
    85.2 KB · Views: 178
Last edited by a moderator:
Level 19
Joined
Aug 24, 2007
Messages
2,888
Weird...
Look Ive got an idea
Make 2 buildings, one is walkable on it like circle of power, one isnt
both have gate model
You have an ability to morph between em and when you morph to walkable one you make it play death animation

So it should be fine I think
I mean use a building instead of destructable
 
Level 5
Joined
Sep 19, 2007
Messages
97
oh man, use a different gate lol.
Most of the other gates are completely destroyed, how did you choose a one that only the door breaks, lol.

LOL, cause I thought it looked nice. Didn't even realize other gates were entirely destroyed. I'll look for one of those instead.

EDIT: This statement is 100% false. Tried a bunch of different gates and they all leave a shell preventing you from building on that area again.

{EDIT 1}
  • Destructible - Dungeon Gate (Horizontal) 3069 <gen> dies
Wow.

Pretty sure that won't work since the gate is placed during gameplay by my builder. That trigger requires you to select a unit on the map I think, and there are no gates placed in the editor.

Also, the destructible doesn't actually die. Just the gate portion does. I've tried 5 different ways, and a Destructible even death is not triggered when a gate is destroyed and still leaves the shell.

{EDIT 2}
After many many attempts, the solution is.....:grin:

  • Gate Destroy
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Destructible - Pick every destructible in Gate Region 1 <gen> and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked destructible) is dead) Equal to True
            • Then - Actions
              • Destructible - Remove (Picked destructible)
            • Else - Actions
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Level 5
Joined
Jan 25, 2006
Messages
103
LOL, can't believe you are using triggers to remove debris.
gate debris is properly removed after being destroyed in 2 of my maps. checked and confirmed.
but whatever, if those triggers work for you than fine.
 
Level 3
Joined
Jul 6, 2008
Messages
42
How can a builder build destructibles ?
If can , teach me pls ~
Btw , to detect destructibles dead
use 2 trigger .

Trigger 1
  • Add Gate to Event
    • Events
      • Map initialization
    • Conditions
    • Actions
  • Destructible - Pick every destructible in (Playable map area) and do (Actions)
    • Loop - Actions
      • Trigger - Add to Remove Gate <gen> the event (Destructible - (Picked destructible) dies)
Trigger 2
  • Remove Gate
    • Events
    • Conditions
    • Actions
      • Wait 2.00 seconds
      • Destructible - Remove (Dying destructible)
Trigger 1 add exist gates to trigger at the game initial . To add gates that build after the game initial (assuming u can build a destructible = =)

Trigger 3
  • Add Gate to Event
    • Events
      • Destructible - A Destructible Finishes construction
    • Conditions
      • (Destructible-type of (Constructed Destructible)) Equal to Gate
    • Actions
      • Trigger - Add to Remove Gate <gen> the event (Destructible - (Constructed destructible) dies)
**Well about trigger 3 all these things is not avaiable in worldedit = = Because I don't know whatever method u use to build a destructible , just customize yourself . If can , teach me how to build destructibles.

*Note : Action :
  • Wait 2.00 seconds
THIS IS VERY IMPORTANT.DIRECT REMOVE DESTRUCTIBLE UPON DEAD WILL CAUSE ERROR !!!

 
Level 5
Joined
Sep 19, 2007
Messages
97
This is how I am building destructibles.

Create a new building with the model of the destructible you want to create.

I just used a custom farm.

  • Gate
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Gate
    • Actions
      • Set DummyPoint_G[(Player number of (Owner of (Constructed structure)))] = (Position of (Constructed structure))
      • Unit - Kill (Constructed structure)
      • Destructible - Create a Gate (Horizontal) at DummyPoint_G[(Player number of (Owner of (Constructed structure)))] facing 0.00 with scale 1.30 and variation 0
      • Custom script: call RemoveLocation( udg_DummyPoint_G[GetConvertedPlayerId(GetOwningPlayer(GetConstructedStructure()))] )
 
Status
Not open for further replies.
Top