Talk:Switch

From Valve Developer Community
Revision as of 01:05, 23 November 2007 by Remmiz (talk | contribs)
Jump to navigation Jump to search

Not quite sure what this is supposed to be about. Is it supposed to be a tutorial on those push buttons? --Remmiz 00:17, 20 Nov 2007 (PST)

Yes. And I would write it, but I can't figure out how to make a ticking sound that is audible anywhere in the map. Using the flag "Play Everwhere" does not do it (it still fades out at distance, or if a wall comes between the entity location and player).
Anyway, what I do is: create a prop_dynamic with model switch001.mdl, and then make a 8x8x8 brush tied to entity func_button (flags: Don't Move, Use Activates). If you want a timed button, set the "delay before reset" to long enough to where it won't interfere with the sequence that the button triggers. A push-only-once button should have delay set to -1. Then I set outputs so that when it's pressed, it triggers a logic relay, which animates the switch down with SetAnimation down (as well as open a door, trigger other logics, etc). If it's a timed button I set the logic also to reset the button with SetAnimation up (also closing a door or triggering other logics).
But I definitely can't convince the button to trigger anything to tick continuously AND globally, while the button is pressed. Any help would be delightful --volt 02:51, 22 Nov 2007 (PST)
Just did some more work with it. I'm starting to think that "Play Everywhere" simply doesn't work in Portal. --volt 03:33, 22 Nov 2007 (PST)
I got this down pretty well, i'll work on a tutorial today. --Remmiz 12:30, 22 Nov 2007 (PST)
Looks good. For cases where the button and door are further apart, it may be helpful to some if this page described that the "Play Everywhere" flag of the tickloop doesn't function correctly if editing for Portal (or at the very least I can't get it to work, and I've tried everything). Alternate routes are to create more switch_sound_tick's or use a logic_choreographed_scene. --volt 23:57, 22 Nov 2007 (PST)
Ive noticed that if you leave the range on the ambient_genertic to the default, it will reach fairly far. You can also increase that if you so need to.--Remmiz 00:05, 23 Nov 2007 (PST)