Func_weldable
by amckern (view all articles)

unrated
Create a button that needs to be welded before being used
by amckern (view all articles)

unrated

This solution is a repost from the ns.org forums, at this thread:
http://www.natural-selection.org/forums/index.php?act=ST&f=4&t=47566&s=160181170e504fac6fc4ddfa286f0c3b
Well, I got it working finally. Thanks for all of the help, guys. In case anyone in the future wants to make a similar effect, here's how I did it.
1 - Set the func_weldable's (1) "Target to trigger on finish" to an env_global (2).
2 - Have the env_global (2) initial state as off, the trigger mode as toggle, and have it set whatever state you want. When triggered by the func_weldable, the env_global turns "on", allowing whatever is depending on its global state to function.
3 - Make the multisource's state master set to the variable that you put in the env_global, and have it target a multi_manager (4). Because the env_global is now on, the multisource will be able to function.
4 - When the player presses the button behind the func_weldable, the multi_manager should activate all of the events that you want done (5) - In this case, the func_rotating, a light, a sound, and the big door (6). Also, it should trigger the env_global again, so that the events cannot be activated while everything is going on. This is good so that a player can't, for example, turn the lights and sound off while the door is still moving.
5 - When the door (6) closes, have its trigger go to the second multi_manager (7), which triggers all of the previous events again, on this time turning them off. Have it also trigger the env_global, making it turn "on" again, and allowing the button to be pressed and the door to be opened/closed as many times as you want.
http://www.natural-selection.org/forums/index.php?act=ST&f=4&t=47566&s=160181170e504fac6fc4ddfa286f0c3b
? quote: |
I'm working on a section of my map where I want to place a button that must first be welded in order to be used, much like the button in the Marine Start in ns_bast. Unfortunately, I'm not very sure on how I would go about doing this at all, since I have found little information on how to use func_weldables. Any suggestions?
EDIT - After playing around with it for a while, using different methods and the three "Target to fire" methods, I've ran out of ideas. One of them, "Target to use (toggle only)" got me to thinking... What I want to have happen is all linked by a multi_manager, so will this not work altogether? Thanks for the help. |
Well, I got it working finally. Thanks for all of the help, guys. In case anyone in the future wants to make a similar effect, here's how I did it.

1 - Set the func_weldable's (1) "Target to trigger on finish" to an env_global (2).
2 - Have the env_global (2) initial state as off, the trigger mode as toggle, and have it set whatever state you want. When triggered by the func_weldable, the env_global turns "on", allowing whatever is depending on its global state to function.
3 - Make the multisource's state master set to the variable that you put in the env_global, and have it target a multi_manager (4). Because the env_global is now on, the multisource will be able to function.
4 - When the player presses the button behind the func_weldable, the multi_manager should activate all of the events that you want done (5) - In this case, the func_rotating, a light, a sound, and the big door (6). Also, it should trigger the env_global again, so that the events cannot be activated while everything is going on. This is good so that a player can't, for example, turn the lights and sound off while the door is still moving.
5 - When the door (6) closes, have its trigger go to the second multi_manager (7), which triggers all of the previous events again, on this time turning them off. Have it also trigger the env_global, making it turn "on" again, and allowing the button to be pressed and the door to be opened/closed as many times as you want.