The
multisource entity is very useful in map-making. It can be used to make the player have to do something, like having to turn on a generator before you are able to open a door or have to activate a number of switches in order to open a door.
How the Multisource is Like an AND Gate
If you have no idea what an AND gate is, don't despair. An AND gate is an electronic circuit that has two or more inputs and one output, much like the
multisource. In my diagram, l=low, and h=high. You can see by my simple (crude?) drawing that all of the inputs have to be high for the output to be high.
No, high doesn't mean stoned here. In electronic terms high means on and low means off, or in computer terms high means 1 and low means 0. Ok so what does all this have to do with Half-Life? Well hold on, I'll get to that. It's my philosophy that you need to know how and why something works in order to fully understand it. Ok so here's where all of this is relevant to the game. The multisource looks for all entities that have targeted it. So those would be the inputs. If you look in an entity's properties, such as
func_door, you will see an attribute called
Master. You put the name of the
multisource there. That would be the output of the
multisource.
An Example
All right, let's go with the example of having to turn on a generator in order to get power to a switch that will open a door. The switch on the generator targets the
multisource entity. The button for the door targets the door and for it's
master has the name of the
mulitsource. So when the player turns on the generator, it allows the switch for the door to be able to be activated. Example map to follow shortly.
This article was originally published on
69th Vlatitude.
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the
TWHL Archiving Project page.