Tutorial: Multisource Last edited 22 years ago2002-07-04 04:00:00 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.

This article was converted from a previous version of TWHL and may need to be reviewed

  1. The formatting may be incorrect due to differences in the WikiCode processing engine, it needs to be revised and reformatted
  2. Some information may be out of date
  3. After the article is re-formatted and updated, remove this notice and the Review Required category.
  4. Some older tutorials are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

Download attachment

This tutorial is primarily about the multisource, but it also covers lots of other stuff that is used in the example map because I happened to be bored when I made it.

Setup

The 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 everthing 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.

This tutorial is dependent on its example map, so you might want to download it to experiment with.
Diagram of multisource conceptDiagram of multisource concept

The Multisource and Buttons

We'll start with the basic 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 targetting 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.

Each of the buttons must target the same thing. Try beam_multi. beam_multi is of course the multisource, which in the example map targets beam_relay. That's about all there is to it,
in fact.

Event Relay

But let's go a bit further. The beam_relay is a 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.
Diagram of chain eventsDiagram of chain events

The Event

Finally, there is the multimanager 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 multimanager (turn off SmartEdit in the Properties window to see or add custom keys).

Multisource Doors

Another important use of 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!

See if you can get Barney to follow you out of the enclosure quickly enough, then get him to run into the big red beam. Oops!
The final resultThe final result

1 Comment

Commented 11 years ago2013-06-12 19:34:00 UTC Comment #100492
This helped me a lot! Thank you.

You must log in to post a comment. You can login or register a new account.