Jump to content
The Dark Mod Forums

Locking out switches with a lock object...


AluminumHaste

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.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...