Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved Quick Question on Levers
Author Message
FragdaddyXXL Offline
Member

Posts: 133
Joined: Apr 2012
Reputation: 7
Post: #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?

Use gamefront. No pop-ups. :D
Dark Seclusion Here
C++/C# Programmer
(This post was last modified: 04-20-2012 06:39 PM by FragdaddyXXL.)
04-20-2012 05:04 AM
Find all posts by this user Quote this message in a reply
Putmalk Offline
Senior Member

Posts: 275
Joined: Apr 2012
Reputation: 15
Post: #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)

Check me out at my youtube channel: http://www.youtube.com/user/Putmalk?feature=mhee

I post videos of my Amnesia creations.
04-20-2012 05:24 AM
Find all posts by this user Quote this message in a reply
FragdaddyXXL Offline
Member

Posts: 133
Joined: Apr 2012
Reputation: 7
Post: #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.

Use gamefront. No pop-ups. :D
Dark Seclusion Here
C++/C# Programmer
04-20-2012 06:02 AM
Find all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 925
Joined: Apr 2012
Reputation: 37
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,234
Joined: Jul 2011
Reputation: 215
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
FragdaddyXXL Offline
Member

Posts: 133
Joined: Apr 2012
Reputation: 7
Post: #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

Use gamefront. No pop-ups. :D
Dark Seclusion Here
C++/C# Programmer
(This post was last modified: 04-20-2012 06:01 PM by FragdaddyXXL.)
04-20-2012 05:53 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)