Jump to content
The Dark Mod Forums

Locking out switches with a lock object...


AluminumHaste
 Share

Recommended Posts

In my map, there is an elevator that goes up to the top floor of the rectory, but I wanted to be able to lock out the buttons with a lock model, so that you need a key to unlock the lock, which allows the keys to work.

Is this currently possible?

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Do it like real life-- put the buttons behind a locked panel.

 

Anything else implies an utterly needless level of mechanical complexity.

 

Just an electrical switch that's turned in place when the key is turned, seems simple to me. There's other reasons, such as presentation.

step1resizeqy7.gifstep2resizexw0.gif

When the priest is done his sermon, he walks over to the elevator, takes a key out of his pocket, puts it in a keyhole with a button above it and turns the key. There is a click and now the button above the keyhole works.

step4resizehc0.gif

Priest gets in and presses the button and the elevator rises 2600 units into the air and stops at a landing hanging from a wall which leads to the upper floor of the rectory.

step5resizewf7.gif

The elevator will then descend on it's own as the priest closes the door to the rectory, and when it reaches the bottom, the bottom of the elevator hits a mechanical switch on the floor which trips the electrical switch locking out the floor control button.

 

It's not that complicated lol <_<:laugh:

 

EDIT: here maybe a screenshot will help illustrate what I mean.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

I can't answer your question, but I must say...

 

DAMN! That looks amazing!

Keep up the good work, I like the marble.

 

Makes my city look extra dull.

|=-=------=-=|

happycheeze.deviantart.com

 

Moddb

 

Gamers Outreach, a nonprofit that uses videogames to raise money for chairty.

|=-=------=-=|

Link to comment
Share on other sites

I don't think anyone's done exactly that yet. Congratulations, you're a pioneer. :)

 

From a quick read of the wiki, seems like locks aren't separate entities; all the lock info is defined directly on the door itself. So you might want to try turning the lock entity into a "door" which doesn't actually move when it opens or closes. When the door is "opened", it will (by default - see wiki) trigger its target.

 

The challenge then is to figure out how to disable the functionality of the buttons. Scripting it by targeting the door to a target_callobjectfunction and following the instructions here is the most obvious way.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

There are several ways to disable the buttons. Perhaps the simplest in this case is to disable the frob (though you may have preferred them to frob but fail to do anything!) There is more than one way to do that but probably the easiest here is to use what we call a 'No Frob Zone'. This is used to stop objects being frobbed out of glass cabinets or a locked chest and a host of other applications. This is how to set it up...

 

First try setting up something like what Crispy described with the lock/door. If you have a problem with that, post again and I'll have a look more closely exactly how to do it. As said, the door doesn't need to move its just the door entity. Then...

  • Surround your button(s) with a brush and give it common/clip texture all over
  • Convert the brush into a darkmod/Targets/info_tdm_objective_location entity [EDIT] target_set_frobable
  • Give it the property start_frobable with a value of 1 if you want it to start frobbable else 0 = starts unfrobbable (default)
  • Give it a name, eg, FrobZone01
  • Add to your door the properties:
  • trigger_on_open 1 (may be default now)
  • trigger_on_close 1 (ditto)
  • target FrobZone1

When the 'door opens' it will enable frob on the button(s); when closed it disables it. You can possibly work out from that the rest but ask again if you need clarification.

Link to comment
Share on other sites

There are several ways to disable the buttons. Perhaps the simplest in this case is to disable the frob (though you may have preferred them to frob but fail to do anything!) There is more than one way to do that but probably the easiest here is to use what we call a 'No Frob Zone'. This is used to stop objects being frobbed out of glass cabinets or a locked chest and a host of other applications. This is how to set it up...

 

First try setting up something like what Crispy described with the lock/door. If you have a problem with that, post again and I'll have a look more closely exactly how to do it. As said, the door doesn't need to move its just the door entity. Then...

  • Surround your button(s) with a brush and give it common/clip texture all over
  • Convert the brush into a darkmod/Targets/info_tdm_objective_location entity
  • Give it the property start_frobable with a value of 1 if you want it to start frobbable else 0 = starts unfrobbable (default)
  • Give it a name, eg, FrobZone01
  • Add to your door the properties:
  • trigger_on_open 1 (may be default now)
  • trigger_on_close 1 (ditto)
  • target FrobZone1

When the 'door opens' it will enable frob on the button(s); when closed it disables it. You can possibly work out from that the rest but ask again if you need clarification.

 

Sorry for not responding but that worked perfectly. The buttons can be highlighted, but don't do anything when frobbed. When using the key on the lock (Door entity), the buttons become usable and the lift goes up :) Thanks for the tips.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

The buttons can be highlighted, but don't do anything when frobbed. When using the key on the lock (Door entity), the buttons become usable and the lift goes up :)
That surprises me; I had expected the buttons to not highlight at all. It's probably better in this case as it gives an impression that the buttons are meant to work but are broken or disabled. Still, puzzling.....
Link to comment
Share on other sites

That surprises me; I had expected the buttons to not highlight at all. It's probably better in this case as it gives an impression that the buttons are meant to work but are broken or disabled. Still, puzzling.....

 

Okay hang on maybe I'm just remembering it wrong let me go check again.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Okay hang on maybe I'm just remembering it wrong let me go check again.

 

hmm it's not working now, I made a new map, just a simple room and did the same thing, and now the switch triggers the light all the time now. It doesn't matter that it's surrounded by a clip brush or anything. Hmmm.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Carefully check through each stage in my description to see if everything correct. If it looks OK then try a separate button targetting the clip brush entity instead of the door. If that works then check you have the door set right as described.

Link to comment
Share on other sites

IGNORE what I said. My apologies. I just checked my own post and I pasted in the wrong entity name. :blush: I copied it from Thief's Den and there were two clip brush entities virtually at the same place and I copied the wrong one. The correct entity name for the clip brush is...

 

target_set_frobable

 

 

I'll change my post

Link to comment
Share on other sites

IGNORE what I said. My apologies. I just checked my own post and I pasted in the wrong entity name. :blush: I copied it from Thief's Den and there were two clip brush entities virtually at the same place and I copied the wrong one. The correct entity name for the clip brush is...

 

target_set_frobable

I'll change my post

 

That's better, now it works. I was wondering why we had to use the other entity as I was reading it's description and it didn't make sense at all to use that particular entity.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Yeah, I must have done that in a rush. In Thief's Den, if you look inside the chests you will see two clip brushes - one is to trigger the objective where you put the incriminating message and the other is just to stop the player frobbing the treasure out of the chest while it is still locked. Guess I never even read it but just copied and pasted the entity name.

 

Glad it's working anyway. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recent Status Updates

    • freyk

      Some years earlier i created some launchers for TDM. uploaded today some new sourcecode and executables on my github repo.
       
      · 0 replies
    • Epifire

      Say, I know it's been a while since the site got overhauled from the crash. But did we ever figure out if/how to get the recent topics & replies list back? It's not a total deal breaker but it was nice for becoming a thread creeper again...


      · 2 replies
    • Epifire

      Some of you who've been on the TDM discord know I was out of work last Winter, just putting in hrs for the developer portfolio. Currently I've been working a seasonal job to pay the bills and now I'm finally in my last week before I get bumped off. Things will be tight but I'm planning a long off period to make as much content as I can. Big plans in Unreal Engine as well as my most ambitious TDM collab yet! Never been so excited to be a stuck at home to pursue my life's work. With a lotta time and maybe some luck, I'm hoping to get enough art work done that I may start applying around to studios.
      · 4 replies
    • STiFU

      I finally got around to play Prey and I truly loved it. It is an incredible homage to System Shock and Deus Ex. While the gameplay is not en par with those two titles, the game makes up for that with its well written lore and story. The whole "world" just feells so authentic and it features a ton of really god environmental story-telling. Recommended for every immersive sim fan, i.e., everyone on this forum.
      · 2 replies
    • jaxa

      Alder Lake has arrived:
      https://forums.thedarkmod.com/index.php?/topic/18055-2016-cpugpu-news/page/15/&tab=comments#comment-466190
       
      · 0 replies
×
×
  • Create New...