Jump to content
The Dark Mod Forums

An elevator lever


Springheel

Recommended Posts

Here's another question about something I'm not sure how to do.

 

I'm setting up an elevator, and I was trying to think of other configurations than pushing buttons to send the elevator from one floor to the next. What I'd really like is a steam-punk style lever, sort of like the image below (not necessarily that large), where the player moves a lever to the number of the floor he wants to go to.

 

I'm not sure exactly how to do that (if it's possible at all) however. The player can't (I don't think) literally frob and 'pull' the lever to the number they want. Having it move forward each time it is frobbed would be too awkward to control.

 

I thought about trying an invisible button over top of each number, but then would there be a way to get the lever to move to that spot?

 

I've never done even a regular elevator before, so I'm a bit out of my depth. Anyone know whether something like this is even doable? Any option would have to be usable by AI as well.

post-9-0-58692300-1357675051.jpg

Link to comment
Share on other sites

One issue you'll have is when the lever is at "3" and you frob it. How does it know to go to "2" or "4"? We'd have to give the player the ability to "grab" the lever, and--while hanging onto it--move it in the correct direction. Sounds like a combination of lever code and grabber code. When the player lets go, the lever would move to the closest "slot" and then probably some script would know what happened and make the elevator go to the right floor.

Link to comment
Share on other sites

Yes, I didn't think that would probably be easy to do, if it would work at all. What about putting a button on the "2", and when the player frobs it, the lever moves to the "2" position (and the elevator goes to the second floor). Is that possible? It's still basically pushing a button, but the aesthetic would look like the player was moving the lever to select the floor.

Link to comment
Share on other sites

Yep, getting that to work would require amnesia like "frob and move mouse to interact" kind of functionality.

 

Invisible buttons and frobbing is bound to be confusing as it is sometime difficult to even frob visible things.

 

Making a stepwise system:

frob 1st time -> lever moves to 2.

frob 2nd time -> lever moves to 3 and so forth would be probably easily doable with scripting. But the AI certainly would not be able to use it.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Yes, I didn't think that would probably be easy to do, if it would work at all. What about putting a button on the "2", and when the player frobs it, the lever moves to the "2" position (and the elevator goes to the second floor). Is that possible? It's still basically pushing a button, but the aesthetic would look like the player was moving the lever to select the floor.

 

I think it is a script, then.

When the button 2 is pressend the elevator works as they do. Simultaneously you call a script.

The script then rotates the aesthetic-only lever handle to the desired position. I'm sure there is a script command like "entityname.rotate(degrees)" or something. Cannot check as modwiki has been down for ages.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Here's another possibility that might be easier (I don't think I'm likely to jump into scripting). A bank of Thief-style levers (see image), one per floor, and the player pulls the one for the floor they want to go to. That would eliminate the need for invisible buttons and still look more steam-punkish.

post-9-0-78356500-1357676564.jpg

Link to comment
Share on other sites

Yes, I didn't think that would probably be easy to do, if it would work at all. What about putting a button on the "2", and when the player frobs it, the lever moves to the "2" position (and the elevator goes to the second floor). Is that possible? It's still basically pushing a button, but the aesthetic would look like the player was moving the lever to select the floor.

 

Yes, you could solve the problem with the addition of buttons. The simple method would be to make the button a standard elevator call button, but have it also call a script to control the lever movement so it rotated to the correct angle. The downside of this design would be that the elevator would begin moving before the lever was finished moving. It would look nicer if the button called a script that rotated the lever to the proper angle and when the lever stopped, target a hidden elevator call button targeted to the elevator.

Link to comment
Share on other sites

Here's another possibility that might be easier (I don't think I'm likely to jump into scripting). A bank of Thief-style levers (see image), one per floor, and the player pulls the one for the floor they want to go to. That would eliminate the need for invisible buttons and still look more steam-punkish.

 

Yes, that would work fine, and wouldn't need scripting. It's the solution I used for the dumbwaiter in In the North: three pull-cords on each of the three floors. Just pull the one for the floor where you want the elevator to go.

Link to comment
Share on other sites

Yes, I really appreciated the fact that it was controlled by ropes instead of buttons. :)

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

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 0 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 replies
×
×
  • Create New...