Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick Question on Levers
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#1
Quick Question on Levers

I am trying to figure out how to make levers only have 2 positions, like a common light switch. Where it can only be on or off, no middle. I need my switch to start out in the off position, and when someone pushes it to the ON position, it stays. I know I can just use a stuck state for that. But how do I get it to start out in the OFF position and not in the default MIDDLE position?

Dark Seclusion Here
(This post was last modified: 04-20-2012, 06:39 PM by FragdaddyXXL.)
04-20-2012, 05:04 AM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#2
RE: Quick Question on Levers

Try setting it to a stuck position in the down position, and then when the player interacts with it, it loses it's stick and so they can move it to the up position. Then, you call a script that when alState == -1, stick the lever in that position, and the same for == 1. (double equals for equality in script)

04-20-2012, 05:24 AM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#3
RE: Quick Question on Levers

Is there a function for setting it's stuck state? I used that technique before, but the user has to click on the lever, then click again to move it. And of course, when you click it the first time, it autofloats to the middle. This adds extra work to something the player needs to do under pressure (waterlurker is-a-comin').

I thought it would be some concoction of using MiddleAngleAmount and AutoMoveGoal. I tried using those to no avail. Like it should automove to the bottom, and its stuck state is at the top.

Dark Seclusion Here
04-20-2012, 06:02 AM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#4
RE: Quick Question on Levers

The "limpness" of Amnesia's switches has bothered me as well. I'm about to wrestle with the issue this week.

Noob scripting tutorial: From Noob to Pro

04-20-2012, 09:37 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Quick Question on Levers

Did you know the piano and openable chests are levers?

Tutorials: From Noob to Pro
04-20-2012, 10:01 AM
Website Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#6
RE: Quick Question on Levers

Oh wow, I just checked. That's actually pretty cool.

Pfft. How silly. It turns out, I needed to check (under the switch's properties) Override Defaults. Once you have this checked, you can go all willy-nilly with the settings below it. Tongue

Dark Seclusion Here
(This post was last modified: 04-20-2012, 06:01 PM by FragdaddyXXL.)
04-20-2012, 05:53 PM
Find




Users browsing this thread: 2 Guest(s)