Jump to content
System downtime for updates - Sunday 13 July 2025 ×
The Dark Mod Forums

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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.

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...