Creating subroutines

Every entity, regardless if it possesses specific outputs, can be used to fire a sequence of events via the FireUser input. The FireUser input can be related to a subroutine. FireUser inputs are useful for complex entity setups that can be triggered multiple times in a cascading fashion.

Creating subroutines

In the example map provided, there is a env_explosion entity parented (attached) to a prop_physics garden gnome. There is a point_teleport entity that teleports the garden gnome on the pedestal behind the glass. There is a trigger_multiple entity behind the button that controls and teleports the gnome to the pedestal and fires a series of explosions to bounce the gnome around the room. Since the env_explosion entity is parented to the gnome, wherever the gnome is, the env_explosion entity is in the same relative position. The button on the post tells the trigger to use FireUser1, and the trigger_multiple entity activates all the outputs relative to the User1 input.

Creating subroutines

Now, any other entity can tell the trigger_multiple entity to trigger FireUser1 and instead of triggering six separate events, only one event needs to be triggered.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.80.45