making doors unlock with keys in maps.

A Forum Thread for Half-Life 2

Hello world. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending kin37ik points.
  • Post: Give kin37ik your thoughts on this Thread.
  • Flag: Alert moderators and warn members of a problem with this Thread.
  • Watch: Get notified when this Thread is updated.
Mascot

Resistance is futile...

Sign up

Already a Bananite? Login

hi, ive been taking notice of some maps out in some mods and other source powered games where they have created a brush based key system to unlock doors among other things, i have noticed Garry's mod scary maps are one of these games, though i may have seen them in others. i went searching for a mapping tutorial to make something like this function in the source engine, but the only tutorials i have found are made for the GoldSrc (hl1) engine, i would largely think its the same but not 100% sure since alot of entities that were present in GoldSrc were made redundant in Source, can anyone share some insight?

Posts

  • 2y
    Devieus avatar
    Devieus avatar ONLINE
    Moderator Joined 7y
    82,035 points Ranked 45th
    64 medals 4 legendary 10 rare
    • 1st Place - Tutorial Contest Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • Returned 5000 times Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Twelve Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Sixteen Winner! Medal icon
    `func_door` entities can be locked/unlocked with a trigger input, so it can be unlocked much more spectacular than after picking up a simple key, it can be after the push of a button or after a bossfight. I thought this was pretty obvious just looking at the door's properties.
    Sentinel of the TV remote avatar
    Mantra
    Sentinel of the TV remote
  • 2y
    kin37ik avatar
    kin37ik Offline
    Member Joined 5y
    > **Posted by Devieus**
    >
    > `func_door` entities can be locked/unlocked with a trigger input, so it can be unlocked much more spectacular than after picking up a simple key, it can be after the push of a button or after a bossfight. I thought this was pretty obvious just looking at the door's properties.

    ahh, i wasnt quite meaning like that, i was thinking of having a key, then having to pick it up with the Use key, then actually having to take it to the lock to unlock the door, sorry i should have been a bit clearer in that regard.
    Rooty tooty point n shooty
  • 2y
    NvC_DmN_CH avatar
    NvC_DmN_CH avatar There
    Apocalyptic Flag Affiliation: Apocalyptic
    Member Joined 4y
    4,174 points Ranked 1111st
    37 medals 1 legendary 6 rare
    • Returned 5000 times Medal icon
    • Submitted 20 Gamefiles Medal icon
    • 3rd Place - The
    • 2nd Place - Alien Devices Modeling Contest Medal icon
    • Returned 1000 times Medal icon
    • Submitted 20 Maps Medal icon
    NvC_DmN_CH avatar
    NvC_DmN_CH
    Apocalyptic Flag
    Apocalyptic
    > **Posted by kin37ik**

    > ahh, i wasnt quite meaning like that, i was thinking of having a key, then having to pick it up with the Use key, then actually having to take it to the lock to unlock the door, sorry i should have been a bit clearer in that regard.

    Ok, do so: make the key func door. Check the **Use Opens** flag, but uncheck the **Touch Opens** one.

    When you pick it up (E) it will open but it won't act as a door.

    Make output "OnOpen" "(your_door_name)" to "Unlock" (in order to make the door openable since you have the key)

    Then "OnOpen" "!self" to "kill" (the key will disappear, as if you just picked it up)

    And so you can make a door openable only when you have the key, via ouputs (they are very useful).
    DmN means DiaMoNd avatar
    Mantra
    DmN means DiaMoNd
  • 2y
    Devieus avatar
    Devieus avatar ONLINE
    Moderator Joined 7y
    82,035 points Ranked 45th
    64 medals 4 legendary 10 rare
    • 1st Place - Tutorial Contest Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • Returned 5000 times Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Twelve Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Sixteen Winner! Medal icon
    > **Posted by kin37ik**
    >
    > > **Posted by Devieus**
    > >
    > > `func_door` entities can be locked/unlocked with a trigger input, so it can be unlocked much more spectacular than after picking up a simple key, it can be after the push of a button or after a bossfight. I thought this was pretty obvious just looking at the door's properties.
    >
    > ahh, i wasnt quite meaning like that, i was thinking of having a key, then having to pick it up with the Use key, then actually having to take it to the lock to unlock the door, sorry i should have been a bit clearer in that regard.

    Right, well that exact thing happens in Half-Life 2 with the batteries, opening a barrier on highway 17, that would require a `prop_physics` or a `func_physbox` and a `trigger_teleport` with a `filter_activator_name` to match the key. The teleporter teleports the key to the right place and position when the key is 'close enough' using an `info_target` or `point_teleport`, as well as fire an output when it teleports (onTrigger, maybe) to open/unlock the door.
    Sentinel of the TV remote avatar
    Mantra
    Sentinel of the TV remote

Embed

Share banner
Image URL:
HTML embed code:
BB embed code:
Markdown embed code:

Submitter

kin37ik avatar
kin37ik Offline
Member Joined 5y

kin37ik
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Stats

Posts
4
Views
1,269
Date Added
2y
Date Modified
2y
bcp.crwdcntrl.net tracking pixel