lever switch(need help)

Avatar
DAWH95
16 Posts
Posted Jun 15, 2011
hello, im working on a underground map where i have to activate lights,gelpumps and more with lever switches, also called circuit breaker's

how do i make them?

edit: use door_rotating and the circuit breaker box

the prop_door wont rotete the way i want it to rotate...

Advertisement
Registered users don’t see ads! Register now!
Avatar
r1corix
90 Posts
Posted Jun 15, 2011
Replied 1 hour later

http://developer.valvesoftware.com/wiki ... vel_Design

Avatar
Idolon
417 Posts
Posted Jun 15, 2011
Replied 5 minutes later
I think he's talking about the circuit breaker kind, like the levers you see in cooperative (pull both at the same time). In that case, I have no idea. I just tried to implement one the other day to no avail. I recommend just decompiling a Valve map and checking how they did it.
Avatar
DAWH95
16 Posts
Posted Jun 15, 2011
Replied 4 minutes later

Idolon wrote:
I think he's talking about the circuit breaker kind

yes! i didnt remember what i was called.

yes i need a circuit breaker trigger for my singleplayer map,but i dont know how to make them

Avatar
Pete
52 Posts
Posted Jun 16, 2011
Replied 18 hours later
The way Id do is is to have a small invisible func_door_rotating at the base of the lever with the lever parented to it, and a invisible func_button covering the entirety of the breaker that triggers it, and whatever the breaker does.
Avatar
NocturnalGhost
200 Posts
Posted Jun 16, 2011
Replied 3 hours later
The way Valve does it is to use a nodraw func_door_rotating at the pivot point, with the "use opens" flag. Then the lever model is parented to it, using prop_dynamic_override (i'm not sure why), and a prop_static for the breaker box itself.

Additional effects used are env_spark, and a couple of env_sprites (red and green) to show the status of the switch.

Avatar
DAWH95
16 Posts
Posted Jun 17, 2011
Replied 18 hours later
couldsomeone make a prefab?

i have tried func_door_rotating

prop_door_rotating

func_rotating_button

but nothing rotates the way i want it to rotate....

i really hate to make those underground gates too because THEY ROTATE THE WRONG WAY and they are ROTATING AROUND THE WRONG POINT....

Avatar
Vordwann
767 Posts
Posted Jun 17, 2011
Replied 41 minutes later
Underground Gates: Did you move their origins and check the correct axis in the "flags" tab???

Lever: Did you move the func_rotating or the origin to where you want the axis of rotation, check the correct axis in the "flags" tab, and also, if necessary, click the "reverse direction" flag?

Avatar
DAWH95
16 Posts
Posted Jun 17, 2011
Replied 6 hours later

Vordwann wrote:
Underground Gates: Did you move their origins and check the correct axis in the "flags" tab???

Lever: Did you move the func_rotating or the origin to where you want the axis of rotation, check the correct axis in the "flags" tab, and also, if necessary, click the "reverse direction" flag?

i moved the orgin,but it rotates around something else and not the orgin...

Avatar
Vordwann
767 Posts
Posted Jun 17, 2011
Replied 2 hours later
What about the axis and direction?
Avatar
NocturnalGhost
200 Posts
Posted Jun 17, 2011
Replied 3 hours later
Prop_door_rotating isn't used at all in the game, and none of the models work properly with it. For the gates, use a func_door_rotating with the gate model parented to it.

Here's a quick example map with the switches and underground gates. I put the switches close to each other for easier testing.

switch_gate.vmf

Ignore the crappy texturing. :lol:

Attachments
switch_gate.vmf
0.05 MB 159 downloads
Avatar
DAWH95
16 Posts
Posted Jun 18, 2011
Replied 16 hours later

NocturnalGhost wrote:
Prop_door_rotating isn't used at all in the game, and none of the models work properly with it. For the gates, use a func_door_rotating with the gate model parented to it.

Here's a quick example map with the switches and underground gates. I put the switches close to each other for easier testing.

switch_gate.vmf

Ignore the crappy texturing. :lol:

thank you, and i dont really care about the textureing because i can fix it anytime i want to fix it.

Avatar
club
44 Posts
Posted Jul 01, 2011
Replied 13 days later
@NocturnalGhost
A million thanks for this example!
Avatar
emileriky
1 Posts
Posted Sep 26, 2012
Replied 1 year later
try ticking "y axis"in flags,

and make sure the pitch yaw and roll are good.

Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Sep 26, 2012
Replied 1 hour later

emileriky wrote:
try ticking "y axis"in flags,

and make sure the pitch yaw and roll are good.

Didn't you notice you're replying to a post over 1 year old? :wink: