User Inputs and Outputs

From Valve Developer Community
Revision as of 16:23, 12 November 2007 by OubocBocze (talk | contribs)
Jump to navigation Jump to search

honda motorcycle accessories buy games online free dating site lookup reverse phone numbers motorcycle tire free single dating service ponchos phentermine prescriptions toyota repair manual viagra bad credit mastercard diamond engagement rings buy viagra---cheap jewelry football betting cash money new car comparison treatment of rosacea online slots cheap ticket airline honda civic hatchback north carolina airline continental motorola razor heelys ford wood display cabinet computer security bowflex trinidad zoloft buy online actos vacheron constantin kamagra datin handbag louis vuitton replica designer handbags bike helmets mosquito ring tone agreement rental plotter used boats butterfly knifes unsecured personal loans with bad credit wall clock birthday gifts child health people discount hotel paris license plates discounted designer handbag spirit airline fare sun country airlines diflucan aciphex online phone mre halloween decoration book flights cheap airline ticket household chores china southern airline garnishment discount fabric longines watch toyota fj cruiser fuji cameras tall clothing adult dvds jade jewelry generic plavix music sheets arizona realestate online black jack game cancun beaches bluetooth phones a6 audi nursing scrubs numerology denon education real estate forms microsoft powerpoint plus size halloween costumes discount cigarette discounted designer handbag sell house disney land nike dunks free game honda civic parts cigarette sale jigsaw puzzle gay sex men reverse phone number air compressor parts limousine hire buy vicodin home decor gazebo The FireUser1-4 inputs and OnUser1-4 outputs are available on every entity that can receive Inputs and Outputs. This set of controls are specially linked to work together. Although they are not used very commonly, User inputs and outputs can be very powerful and make certain tasks far easier to accomplish.

The FireUserN input simply causes the corresponding OnUserN output on the same entity to fire. These are useful for forwarding messages through an entity where the desired target is known to the forwarding entity, but not to the firing entity.

For example, say you have three trains moving along the same set of path_tracks. Each train has a glowing env_sprite parented to it, and on one path_track you want to turn off the sprite on whatever train has just passed. The problem is that the path_track doesn't know which train has just passed, so you can't connect the "OnPass" output to the right one. So, you solve this by connecting the path_track's "OnPass" output to the !activator (the train) FireUser1 input, and then connect each train's OnUser1 input to turn off their parented sprite.

In the past, you could hack around this kind of thing by putting a trigger_multiple for every train on the path_track, set them to only trigger when the matching train touches them, and use the "StartTouch" output to turn off the sprite. Unfortunately, that method doesn't scale to large numbers of trains (as seen in the Citadel section of Half-Life 2).