multisource
multisource
is very useful, and it can be applied to many situations. The concept is simple: it's a trigger that will only activate its target once everything targeting it is active. In boolean logic, it's similar to an 'AND' operator. This tutorial covers two uses: triggering an event, and unlocking a door. To add a bit of variety, we'll make sure the 'event' only happens once, while the door activation can be toggled.func_button
multisource
setup. For this tutorial we will use three buttons as our triggers, but you can use any number of any kind of trigger. The multisource
will only trigger its target when all of the triggers targeting it are active, or 'on'. So, because we're using buttons, we'll need to make sure they stay on long enough for the player to be able to press all three. In the example map, the delay is 13 seconds for each button. In some situations you might want the button to stay pressed forever though.multisource
, which in the example map targets beam_relay. That's about all there is to it, in fact.
trigger_relay
trigger_relay
that targets beam_manager. The important thing about this entity is that the flag Remove on fire is on. If the relay weren't there, once the buttons had reset, they could be turned back on again, and the multisource
would toggle its target off, which we don't want. But because it is there, after being triggered once, the relay disappears and the link between the multisource
and the main event (beam_manager) is broken, so beam_manager cannot be retriggered.
multi_manager
multi_manager
called beam_manager that handles the main 'event', which is a sequence of sounds and beams that turn on one after the other. The delays are determined by the values of the keys of the multi_manager
(turn off SmartEdit in the Properties window to see or add custom keys).
func_door
multisource
entities is for locking and unlocking doors. In the example map, the door at the far end has been set up with some basic properties. The important one is Master. Set this to the name of the multisource
(beam_multi in the example map). Now the door will not open unless the multisource
is active. This is a different scenario to event triggering; although the multisource
doesn't actually trigger the door to open, the player cannot open it unless the multisource
is active. So if you press all three buttons and then run to the door, you can get inside, pick up the shotgun and kill Barney. But make sure you get out again before any of the buttons resets, because then the multisource
will turn off, and the door will lock!You must log in to post a comment. You can login or register a new account.