• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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,392
  • 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