Please or Register to create posts and topics.

I need a way to use the power switch/lever!

I'm making a destroyed chamber for my map, and I'd like to have the player go backstage and turn on the power to make the test work. But, after looking through the instances, google, here, and a decompiled map, I can't find an easy way to make the power switch (the kind you flip when you enter Old Aperture to open the door). Does anyone have an instance, prefab, etc. that they could point me to? Thanks.

I think you can use this tutorial: http://www.interlopers.net/tutorials/14584

12 Angry Tests
"I hear voices. But I ignore them and I just carry on killing."

I think your tutorial is a bit too not-portal,
I would do this:

Create a prop_static with world model circuit_breaker_box and one circuit_breaker_lever.
create an invisible prop_rotate at the edge of the lever, set it to rotate 180 degrees and give it speed 200.

Then Create a func_button and put it all over the box.
Give that Onpressed -> door, open 0.00
Onpressed -> door, close, 1

Hope that helps :)

You can have a squiz at this topic too if you want.

Image
I think in terms of boolean variables. Generally, it makes things easier.

Thank you all! I knew there had to be at least one tutorial on how to do it. I guess not very many people use it, since it's really used for plot than as a gameplay element.

You need the lever to be dynamic. Not static. Only the box model should be static.

My Maps:
[spoiler][SP] Alternate[/spoiler]
Vordwann wrote:
You need the lever to be dynamic. Not static. Only the box model should be static.

It really doesn't matter if the lever is static or dynamic as the lever is not what gets moved by the player. Now I can't remember if a static object can be moved by a parent object or not so it is probably wise to just go with a dynamic one.

Wow! That was...uh, yeah. Just, yeah.

Yes, a static object can't be moved by a parent, which is why I suggested to make the lever model, which is parented to the rotater, dynamic.

My Maps:
[spoiler][SP] Alternate[/spoiler]
protoborg wrote:
Vordwann wrote:
You need the lever to be dynamic. Not static. Only the box model should be static.

It really doesn't matter if the lever is static or dynamic as the lever is not what gets moved by the player. Now I can't remember if a static object can be moved by a parent object or not so it is probably wise to just go with a dynamic one.

:-?

12 Angry Tests
"I hear voices. But I ignore them and I just carry on killing."

Very confusing posts, allow my to clarify (whether you like it or not):
1. Circuit Box is a prop_static
2. Lever is a prop_dynamic
3. A NoDraw brush the size of the lever is tied to entity "func_door_rotating" and placed on top of lever with the appropriate settings*.
4. Lever is parented to NoDraw brush.

*-Depending where it is positioned, the settings maybe not always be the same

Crazy is as crazy does.
My Work
[spoiler]Maps:
Revenge of the Angry Turrets
Capture the Cube [Co-op]
Capture the Cube 2 [Co-op]
TPWEGTH Sample Map
Aperture Aquatic Testing Center
Aperture Aquatic Testing Center 2
Aperture Time Testing Center
ML's Halloween Trick - 1000 downloads!
ML's Halloween Treat
ML's Combination - 1000 downloads!
ML's Jailbreak Labyrinth
ML's Tricky Teamwork [Co-op]
WIP:
"Capture the Cube 3"
Workshop Maps Link: http://steamcommunity.com/profiles/76561198008890579/myworkshopfiles/[/spoiler]