• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Help With Gates and Keys

Status
Not open for further replies.

Kzl

K

Kzl

In a map I'm currently working on, there's a part where you need a key to pass a gate (specifically a Force Wall).
Currently, I have this trigger:
  • Force Wall
    • Events
      • Unit - A unit enters Force Wall Kill <gen>
    • Conditions
      • (Item-type of (Item carried by (Entering unit) in slot 1)) Equal to Ghost Key
    • Actions
      • Destructible - Kill ForceWall 3999 <gen>
      • Item - Remove (Item carried by (Entering unit) of type Ghost Key)
It works perfectly. If the unit has the key in the first inventory slot, the Force Wall will disappear. However, I wanted to make it so that the key could be in any slot, and the gate would still open.
I've tried messing around with 'Or, Multiple Conditions' triggers, but that doesn't work. I've never really had to do any of this kind of triggering, so I'm at a real standstill.
Any help?

~Kzl
 
  • Force Wall
    • Events
      • Unit - A unit enters Force Wall Open <gen>
    • Conditions
      • ((Entering unit) has an item of type Ghost Key) equals True
    • Actions
      • Destructible - Open ForceWall 3999 <gen>
      • Item - Remove (Item carried by (Entering unit) of type Ghost Key)
Thats it :P If you are creating a maze maybe order the unit to stop because it can happen thet the units tries to run arround the Wall and dies
 
gates and keys

Look at this and try it
Hope and works and Have a nice day. gatesAndKeys.JPG
 
  • Force Wall
    • Events
      • Unit - A unit enters Force Wall Kill <gen>
    • Conditions
      • ((Triggering unit) has (Item carried by (Triggering unit) of type Ghost Key)) Equal to True
    • Actions
      • Destructible - Kill ForceWall 3999 <gen>
      • Item - Remove (Item carried by (Entering unit) of type Ghost Key)
      • Trigger - Turn off (This trigger)
I changed it to this (only because I couldn't find the exact condition you guys were referring to :grin:), and it works fine. Thanks for all your help. I appreciate it. +Rep for you guys.

~Kzl
 
Status
Not open for further replies.
Back
Top