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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...