Help with WC3 Gates in Editor

nolabel

Member
Reaction score
1
Hey I'm new to this forum so I hope this is the right place to post this question. Basically I'm trying to make "locked" + "Unbreakable" gates in my WC3 map that require "Keys" to get through.

EXAMPLE: Let's say you kill a monster and you get an item that is a key for a specific gate. Then you go the gate that uses that particular key and it opens but the key only works on THAT gate AND disappears after used.

Can anyone direct me to a walk through that will tell me how to do this or can anyone tell me how to do it in their own words in a reply?

I'd much appreciate it and thank you all.
 

Ishida

New Member
Reaction score
1
Alright, what you need to do is make the gate invulnerable.

Next, make a region outside the gate.

Inside the region, check to see if the player has the key.

If so, Set gates health to 0, or make it's armor 0 (To knock it down)

Don't forget to delete the key.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You could also make the key a charged item, and give it an ability that targets gates. Then, when a key is used, detect if it's the right key for the right door, and if so, use the trigger action Destructible - Open/Close/Destroy Gate.
 

nolabel

Member
Reaction score
1
You could also make the key a charged item, and give it an ability that targets gates. Then, when a key is used, detect if it's the right key for the right door, and if so, use the trigger action Destructible - Open/Close/Destroy Gate.

I like this idea because I want the key to open the gate...not destroy it. Further more this idea renders the key useless after it's used. However my skill with this kind of editing is lacking. So could you give me a more detailed walk-through? Especially detailed on the "specific key detection" part since I've NEVER done detections before.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Basically, you have a trigger that detects when a key is used. In this case, you give every key a custom ability that does nothing and targets destructibles (gates).
Trigger:
  • Open Door
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions

After this, you want to know if the key being used is the key for the gate. You can use a different item-type for every key, or make each key the same and use preset conditions.
Trigger:
  • Open Door
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item being manipulated) Equal to Key 0001 <gen>
      • (Target destructible of ability being cast) Equal to Gate 0001 <gen>
    • Actions
      • Destructible - Open (Target destructible of ability being cast)

--Or--
Trigger:
  • Open Door
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Gate 1 Key
      • (Target destructible of ability being cast) Equal to Gate 0001 <gen>
    • Actions
      • Destructible - Open (Target destructible of ability being cast)
 

nolabel

Member
Reaction score
1
Basically, you have a trigger that detects when a key is used. In this case, you give every key a custom ability that does nothing and targets destructibles (gates).
Trigger:
  • Open Door
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions

After this, you want to know if the key being used is the key for the gate. You can use a different item-type for every key, or make each key the same and use preset conditions.
Trigger:
  • Open Door
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item being manipulated) Equal to Key 0001 <gen>
      • (Target destructible of ability being cast) Equal to Gate 0001 <gen>
    • Actions
      • Destructible - Open (Target destructible of ability being cast)

--Or--
Trigger:
  • Open Door
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Gate 1 Key
      • (Target destructible of ability being cast) Equal to Gate 0001 <gen>
    • Actions
      • Destructible - Open (Target destructible of ability being cast)

Thanks for taking the time to post that. You're awesome. I'll let you know how I fair at taking these directions and applying them to my map.
 

nolabel

Member
Reaction score
1
I'm confused. I don't know which conditions you used to get the conditions you posted. Also how do you make an ability that does nothing?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
1). In the order they appear: Item Comparison, Destructible Comparison, Item-Type Comparison. Destructible Comparison.
2). Any unit-target ability will work, so long as it doesn't stun and you nullify all slows/stuns/damage/etc. Try Cripple.

Working on a test map for ya. ;)
 

nolabel

Member
Reaction score
1
1). In the order they appear: Item Comparison, Destructible Comparison, Item-Type Comparison. Destructible Comparison.
2). Any unit-target ability will work, so long as it doesn't stun and you nullify all slows/stuns/damage/etc. Try Cripple.

Working on a test map for ya. ;)

That's probably best because even with the directions you gave me I still cant get it to work. Hope to have that test map soon for reference. Thanks.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
If you give me more info, I could probably make a more specific example.
 

Attachments

  • Key Vs. Door Guide.w3x
    23 KB · Views: 274

nolabel

Member
Reaction score
1
If you give me more info, I could probably make a more specific example.

Okay. I'm at work right now so I haven't be able to use your map yet but here’s what my goal is.

I'm making a very large dungeon with multiple Gates that can be destroyed via attacking, and multiple Gates that are "locked" and Invulnerable. Each locked gate will have a specific Key (item) that is dropped from a unit. Each Key will belong to a specific locked Gate and will not work on any other locked Gates at all. I'd like the Gate to "open" and not be destroyed once the correct Key is used. Also, once the Key is used on the correct gate, I'd like the game to then destroy the Key, effectively removing it from the Hero’s inventory.

So I hope that paints a much better picture and I apologize for not explaining in detail sooner. You've been very helpful to me and I know this is all going to be solved with all the thanks going to you of course.
 

nolabel

Member
Reaction score
1
If you give me more info, I could probably make a more specific example.

Okay just played the map you posted and it looks like you did exactly what I was looking to do. I'll try to work it into my map and I'll let you know how well I do. In the meantime if you still want to reply with more info to this go right ahead.

*EDIT/UPDATE*

Hey I used your map to help me and I've got everything working just as I had hoped. You're awesome and I really appreciate your patience with me. I will be sure to give you full credit for this when my map is finished.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top