• 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 make a gate that requires a key to open it?

Status
Not open for further replies.
Level 2
Joined
Nov 10, 2011
Messages
12
Hello, everybody! I'm workin' on a map and I have some Q's. Maybe I look like a noob, but I don't care. Please answer, thanks.

-how can I change where the unit/hero/whatever is looking at?
-how can I make a unit to be bigger or smaller?
-how can I make a gate to be closed and you to need some keys or items to open it?
-where can I find wall? I was searchin' for it 2 days
-where can I find that square that when in some maps when you stay on it some things appear... that square with white lights on it... and how can I use it?
-some help with quests?

Thanks(sorry if my eng is bad)!
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
1. You can change the "0.00" to your choice.
  • Actions
    • Unit - Make Your_Unit face (whichUnit) over 0.00 seconds
    • Unit - Make Your_Unit face (Your_Point) over 0.00 seconds
    • Unit - Make Your_Unit face (Your_Angle) over 0.00 seconds
2. Object Editor (F6), "Art - Scaling Value".
3. Will answer later.
4. Object Editor, Destructibles, CTRL + F and type "Stone Wall" (without quotations).
5. Object Editor, Destructibles, CTRL + F and type "Foot Switch" (without quotations). You need to use triggers to make things happen (will tell more later).
6. Quest apply for everyone. This means, if you create a quest, it will be created for all players. If you want it just for one player, you have to use some scripts.
 
Maybe I look like a noob, but I don't care.
Never ever think of yourself like that, we all started from zero, no one has right to say things like that to you, if you find someone bothering you please report comment/post/resource/user and we will handle that situation.

Anyway about questions:
-how can I change where the unit/hero/whatever is looking at?
Open Object Manager and find Art - Model File Field.
how can I make a unit to be bigger or smaller?
There is another filed right below this one.

Will answer to other when I finish something ^_^
 

Attachments

  • 2.JPG
    2.JPG
    33.5 KB · Views: 219
  • Capture.JPG
    Capture.JPG
    68.2 KB · Views: 218
Level 8
Joined
Jan 8, 2010
Messages
493
how can I change where the unit/hero/whatever is looking at?
you can also use
  • Animation - Lock Unit1's Head to face Unit2, offset by (0.00, 0.00, 90.00)
to make a unit always lock its look into a unit, though it will look ugly when Unit2 is at the back of Unit1, as Unit1's head will look backwards :p
and use
  • Animation - Reset Unit's body-part facing
to reset the unit's default facing.

where can I find wall? I was searchin' for it 2 days
there are many walls. you have
Cityscape, Dalaran, Dalaran Ruins -> Structures -> Wall Low
Sunken Ruins -> Trees/Destructibles -> Stone Wall
Lordaeron (Fall, Winter, Summer) -> Trees/Destructibles -> Stone Wall
Any -> Props -> Fence
Icecrown Glacier -> Trees/Destructibles -> Stone Wall
Dungeon -> Structures -> Wall Barred
Dalaran -> Trees/Destructibles -> Magical Pen Wall, Stone Wall
Barrens -> Structures -> Ruined Wall
 
Level 2
Joined
Nov 10, 2011
Messages
12
1. You can change the "0.00" to your choice.
  • Actions
    • Unit - Make Your_Unit face (whichUnit) over 0.00 seconds
    • Unit - Make Your_Unit face (Your_Point) over 0.00 seconds
    • Unit - Make Your_Unit face (Your_Angle) over 0.00 seconds
Well good answer mr bean. That's what I wanted to hear/read :D. Thank you! But in the same time I wanted to know how to make the unit... you know... when i click on a unit to put it on the map it's let's say diagonal, how can i change that? I'm not sayin' only he's head where he's lookin'.

Never ever think of yourself like that, we all started from zero, no one has right to say things like that to you, if you find someone bothering you please report comment/post/resource/user and we will handle that situation.
Thank you. :grin:
 
Level 8
Joined
Jan 8, 2010
Messages
493
when you place a unit on the WE, you can either:
1.select the unit and press Enter, you'll have Units Properties, and on the Generals Tab there is a Facing (deg). you can change it to whatever angle you want the unit to face
2.select the unit, hold CTRL and drag the mouse to have the unit face to where you are dragging the mouse
 
Level 2
Joined
Nov 10, 2011
Messages
12
6. Quest apply for everyone. This means, if you create a quest, it will be created for all players. If you want it just for one player, you have to use some scripts.
That's not what I mean. The Q is like "How can I make quests?!" -.-

when you place a unit on the WE, you can either:
1.select the unit and press Enter, you'll have Units Properties, and on the Generals Tab there is a Facing (deg). you can change it to whatever angle you want the unit to face
2.select the unit, hold CTRL and drag the mouse to have the unit face to where you are dragging the mouse
My hero! Thank you!

Thank you everybody. Three question and I'm done. Thnx again!
-how can I make a gate to be closed and you to need some keys or items to open it?
-where can I find that square that when in some maps when you stay on it some things appear... that square with white lights on it... and how can I use it?
-some help with quests?
 
Level 8
Joined
Jan 8, 2010
Messages
493
and about quests, here's a tutorial on the site:
How To Make A Simple Quest

quests are literally triggered, and different quests require different triggers. if you want help on a particular quest that you don't understand (a unit must be killed, a certain amount of resources must be accumulated, a hero must not be killed, defend a town until timer countdown, etc) you can ask here :)
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Gates:
Edit: I forgot about the part where you need an item to open the gate - my trigger is wrong.
  • Map Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Gate = Demonic Gate (Diagonal 1) 0000 <gen>
  • Open Gate
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Destructible - Open Gate
  • Close Gate
    • Events
      • Unit - A unit enters Region 001 <gen>
    • Conditions
    • Actions
      • Destructible - Close Gate
Foot Switch:

  • Step on Switch
    • 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
          • (Foot Switch 0001 <gen> is alive) Equal to True
        • Then - Actions
          • Destructible - Kill Foot Switch 0001 <gen>
          • -------- Your actions --------
          • Destructible - Resurrect Foot Switch 0001 <gen> with (Max life of Foot Switch 0001 <gen>) life and Show birth animation
        • Else - Actions
If you want to use the switch again, you will have to resurrect it:
  • Destructible - Resurrect Foot Switch 0001 <gen> with (Max life of Foot Switch 0001 <gen>) life and Show birth animation
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
-how can I change where the unit/hero/whatever is looking at?
This is impossible seeing as how units do not look at anything in WC3. Unit behaviour is controled by the game engine which does target aquisitions and movement. The art of a unit is nothing more than a model which textures the eyes the same as any other part of the model.

If you want the unit's head to face a specific direction, then you use JASS script to do this. There is a native that tells the animation engine to rotate a unit's head to face a certain direction or another unit. There is also support for the entire upper torso and head to be rotated to face a direction.

-how can I make a unit to be bigger or smaller?
There is a field in the object editor for every unit that represents unit scale. You can also use JASS script to scale a unit via the appropiate native. Be aware that not all fields in all art scaling natives work but you can definatly scale units.


-how can I make a gate to be closed and you to need some keys or items to open it?
You spawn the gate closed and make it invulnrable. You then use JASS script to create a trigger that fires when a unit aquires the appropiate item. The trigger responds to this by killing the gate and playing the open animation (this is how the GUI implimentation of Opening/Closting a gate works).

-where can I find wall? I was searchin' for it 2 days
Some large houses and most castles have walls. You could try using google street view to check if a certain property has a wall.

If you mean wall models for use in your map then there are many destructables which have models of stone wall segments that you can join to make a bigger wall. The Hive Workshop (thats us) have some in our model section that can be found by searching for "Wall".
 
Level 7
Joined
Aug 31, 2011
Messages
125
Okay, i will answer the "Open Gate" clearly good as possible using GUI and not Jass/vJass :p
1: - In object editor, go to your gate (or if you don't have one yet create one) and do : Combat - Targeted as : Invulnerable.
2: - Make your gate and place it somewhere. Place your gate where you want it to be.
3: - Make a region where you have to step to unlock the gate.
4: - Make a item (the item is the key).
5: - Make it so it's possible to obtain the key. (Ex: Make it sellable, make it quest reward, Place it in the map, etc..)
6: When you completed all that put this trigger in:

  • Open Gate
    • Events
      • Unit - A unit enters The Region you made <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type The key you made) Equal to True
        • Then - Actions
          • Hero - Drop (Item carried by (Triggering unit) of type The Key you made) from (Triggering unit)
          • Item - Remove (Last dropped item)
          • Destructible - Open your gate <gen> (if you make it just spawn at a certain time, put it as a variable)
          • Set GatePoint = (Position of Your Gate <gen>)
          • Special Effect - Create a special effect at GatePoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Custom script: call RemoveLocation(udg_GatePoint)
          • Game - Display to (All players) for 5.00 seconds the text: Gate Unlocked
          • Trigger - Turn off (This trigger)
        • Else - Actions
-Hope this Helps
-(Note:) I will be putting a example map for you to see.
+ Gates are closed always unless you want to open it and close again, if you want that i can probably post how.
@Mr Bean 987 I think he wants the key removed too :p so i just posted the full version of how it should be lol :p
----------------
Example map added.
 

Attachments

  • Open Gate.w3x
    18.3 KB · Views: 102
Last edited:
Level 21
Joined
Jul 2, 2009
Messages
2,952
I always wondered this as well in which you made the gates locked and you had to use a key per-say in which you find from the icon and it will allow you to open the door up, and the key will simply vanish from existence.
 
Level 7
Joined
Aug 31, 2011
Messages
125
Making the key active item with an ability to target destructibles instead of using regions would be more logical approach.

I always found the region method dumb.

I think using regions would be the BEST way to do it because there is no problem with having a region :p and your way can do the trick too but it would just be to much work (not too much, just over reacting) :p
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The region method is used to make gameplay more fluid.

Region method
Hero needs to pass door. Door needs key. Hero gets key. Hero walks to door. Door opens. Hero can continue walking.

Active item method
Hero needs to pass door. Door needs key. Hero gets key. Hero walks to door. Hero stops to target door with key. Door opens. Hero can walk through door.

Active item method slows gameplay down. You will also start to run into problems of incompetent players not seeing the obvious. One might think using the key on the door is logical but I am sure some people would start to rage because they try doing other stupid stuff with the key (such as dropping it near door) before casting it at door.
 
Status
Not open for further replies.
Top