Frictional Games Forum (read-only)
Quick Question on Levers - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Quick Question on Levers (/thread-14939.html)



Quick Question on Levers - FragdaddyXXL - 04-20-2012

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?



RE: Quick Question on Levers - Putmalk - 04-20-2012

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)



RE: Quick Question on Levers - FragdaddyXXL - 04-20-2012

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.



RE: Quick Question on Levers - Cranky Old Man - 04-20-2012

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



RE: Quick Question on Levers - Your Computer - 04-20-2012

Did you know the piano and openable chests are levers?


RE: Quick Question on Levers - FragdaddyXXL - 04-20-2012

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