Lever Question. - by Z
Z on 6/8/2001 at 11:48
If I a lever controls a device that is Off, you flick once to turn it On. However, if I CD a switch to a device that's On ( For example, a camera ), you must flick the switch twice to turn it Off, because the switch is in a default Off state.
How do you alter this so that the switch is automatically set to On?
Thanks,
Z
Dark Arrow on 6/8/2001 at 14:27
An inverter (fnord>TrapTrig>Inverter) could do it. Inverter changes on signal to off and off to on. Link the lever to inverter and inverter to the destination of the signal.
Another way to do it would be doing changes to the levers Tweq>JointState property.
[ August 06, 2001: Message edited by: Dark Arrow ]
Hit Deity on 6/8/2001 at 15:07
It might take some experimenting, but I believe the simplest way to do it is like I have in this screenshot:
(
http://www.angelfire.com/goth/mwgarland/images/objecthier.jpg) http://www.angelfire.com/goth/mwgarland/images/objecthier.jpg
Note the AnimS parameter under JointsState being set to both On and Reverse. This lets the first and every signal from the lever no matter what position it starts in to be an On and Reverse signal, so that it flips the switch if it's On or Off, no matter what.
Try it and see if it works. Works for me.
And, you might say, "Hey, that's for a button!" But, if you'll look further, you'll see it's actually a lever in button disguise. (Note the StdLever script added.)
<IMG SRC="thumb.gif" border="0">
[ August 06, 2001: Message edited by: Hit Deity ]
Z on 6/8/2001 at 17:39
Thanks.
Z
Keeper of Metal and Gold on 7/8/2001 at 03:02
You could just set up a trap early on, somewhere Garrett will definitely go, like right under his feet to start with to trigger the switch once, and a destroy trap so it won't trigger it ever again.
sNeaksieGarrett on 11/7/2013 at 03:20
The image doesn't show anymore.
But here's my situation:
I have ONE lever that is hidden on start and is linked to a large door. When Garrett gets within radius of the door, he sets off the door to open, and the lever is teleported into the room. However, the door automatically closes itself after a bit and I run into the double frob issue where when it's closed I have to frob the lever twice. I know you can use the whole link two levers trick, but in this case I don't want Garrett to be able to open the door from one side after it closes, so there's only one lever in this situation.
I tried the On, Reverse and even the inverter, but you still run into the lever issue at some point because of the door closing itself.
MysteryMan on 11/7/2013 at 03:31
Quote Posted by sNeaksieGarrett
The image doesn't show anymore.
But here's my situation:
I have ONE lever that is hidden on start and is linked to a large door. When Garrett gets within radius of the door, he sets off the door to open, and the lever is teleported into the room. However, the door automatically closes itself after a bit and I run into the double frob issue where when it's closed I have to frob the lever twice. I know you can use the whole link two levers trick, but in this case I don't want Garrett to be able to open the door from one side after it closes, so there's only one lever in this situation.
I tried the On, Reverse and even the inverter, but you still run into the lever issue at some point because of the door closing itself.
To avoid this, if you are using a Stim to set the radius, is to have the stim frob a lever that has a frob proxy link, and in the data field "allow direct" just place the other lever in a blue room, so you have just the one lever behind the doors in the other room. If any one of the levers operates the door, open or close, it will work with only one frob the lever, open or closed.
Example: Stim with radius--->Frobs lever to open door(s), Garrett walks in, and Stim uses same lever to close the door. Now that the lever is usuable after being teleported in, Garrett uses the same lever, and thereby only has to frob the lever once to open it again, and close it again.
This is the easiest way of insuring that the same lever opens and closes the door(s) If you have more than one lever opening a single door, then the frob proxy link between the 2 levers which allow direct is a positive way of always being able to frob the lever once to open, and once to close.
The reason you would have to frob the lever twice to get a turn off again is this:
Switch1(Frobbed Once)=Turn On ---->Door Opens, Garrett walks in room, and throws a Different Switch2
Different Switch2(Frobbed Once)=Turn On, but needs(Frobbed Twice) to "Turn Off" ---> close the door.
sNeaksieGarrett on 11/7/2013 at 03:51
Sorry, I should have made that clear in my post. I'm using a boundstrigger to open the door upon Garrett getting close enough to the door, which teleports the lever for Garrett to frob later. If you're wondering how this is possible for Garrett to be back in front of the door again, it's because in T2 multiplayer you can die without failing the mission and respawn, which means you will have to go back through the same door again. Because the door closes itself, I had to insure there was a lever on the one side to open it again.
Hmm, okay I'll have to try this stim method. I'm afraid I don't quite follow you though. Are you referring to creating a marker with S&R with a radius stim?
MysteryMan on 11/7/2013 at 04:00
Quote Posted by sNeaksieGarrett
Sorry, I should have made that clear in my post. I'm using a boundstrigger to open the door upon Garrett getting close enough to the door, which teleports the lever for Garrett to frob later. If you're wondering how this is possible for Garrett to be back in front of the door again, it's because in multiplayer you can die without failing the mission and respawn, which means you will have to go back through the same door again. Because the door closes itself, I had to insure there was a lever on the one side to open it again.
Hmm, okay I'll have to try this stim method. I'm afraid I don't quite follow you though. Are you referring to creating a marker with S&R with a radius stim?
Yes, a marker would work, however an AiWatchObj link to a marker would be easier to implement. This way you just set the radius in the AiWatchObj field, then the Ai would frob the lever which is frobproxy(allowed Direct) to the switch that will be teleported. Both levers are cd linked to the door(s) He has the one in the blue room, and Garrett would use the other that is teleported to the room behind the door(s).
Marker, or close by object with radius stim. The radius is measured from the center of the object to the center of Garrett. The same stim, a receptron would have to be placed on Garrett's avatar. -2099
Garrett's receptron would frob the lever in the blue room, and the frob proxy (allowed direct) lever teleported would act like one lever. Both by the stim, and for use in the room where it is teleported.
Might be a good idea to destroy the marker once it is used, so that it won't retrigger. If you are using an AiWatchObj, then destroying the link after use is an option. On the stim marker, just a simple destroy trap cd linked to the marker, from the lever in the blue room.
sNeaksieGarrett on 11/7/2013 at 15:05
It didn't work, but then I'm not sure I did this right. I was a little confused as to how to set this up. I understand there was the one way where you have the AI frob a lever, but that would require Garrett walking into a boundstrigger or marker that the AI is linked to via AIWatchObj, correct? Then, there's the other way involving S&R, which is the route I'm trying to take. You still have a marker in this case, right?
Here's what I tried:
- I created a new lever so that I now have two.
- I put a FrobStim Receptron on Garrett, min intensity 0, no max
Effect: Frob Object, Target Object BigFloorLever(244)
- I put a Source on the door itself, FrobStim, Propagator Radius, Intensity 0.
Edit Shape: Radius 6.00
- I linked (244),frobbed by Garrett, to (324),the first lever that teleports into the room next to the door, with a FrobProxy (AllowDirect) link.
The 324 lever is CD linked to the door. The 324 lever is ~ControlDevice from a teleportTrap.