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

How can i use a key to open a gate????

Status
Not open for further replies.
Level 2
Joined
Jul 31, 2007
Messages
21
Or, if you are talking about using a physical inventory key to open a gate, just have a condition that checks if the hero entering the gate region has the key in his inventory, unlocking the gate if he does.
 
Level 9
Joined
Jun 18, 2004
Messages
565
  • Melee Initialization
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Entering unit) has an item of type Key of Three Moons) Equal to True
        • Then - Actions
          • Destructible - Open (Last created destructible)
        • Else - Actions
          • Do nothing
Thar ya go.
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
  • Melee Initialization
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Entering unit) has an item of type Key of Three Moons) Equal to True
        • Then - Actions
          • Destructible - Open (Last created destructible)
        • Else - Actions
          • Do nothing
Thar ya go.

If what he needs is what Tevin suggests... but realy no need to make it with the then/else actions... just will do fine..:
  • Events
    • Unit - A unit enters Door Key Region <gen>
  • Conditions
    • ((Entering unit) has an item of type Key of Three Moons) Equal to True
  • Actions
    • Destructible - Open (Locked Gate (it is a variable)

And the other trigger would be something like:

  • Events
    • Player presses a key (cant remember exact name but something similar
  • Conditions
    • Pressed key equal to (lets just say) D
  • Actions
    • Destructible - Open (Locked Gate (It is a variable)
Done, for the exact trigger to key's youcould see it in some keybased maps, like pirate tag. (hostet projects)
 
Status
Not open for further replies.
Top