Input/Output System

Tutorial collection, comprehensive listings on main site.

Input/Output System

Postby Tutorial on Sat Jan 07, 2006 4:25 pm

General Half-Life 2/Entities

Entities are controlled via the powerful but simple to use I/O system, find out how to set it up.

input, output, system, input/output, io, i/o.

Now We're gonna understand the basic of the I/O System. Its easy but very useful for the beginners.

What is the I/O System ?

Well We can call it the new version of the old "Target" field in hl1. But now more advanced, making it easy to use.

The Meaning of Input and Output

Ok. Output is like an order given to something (entities) that must be done. Example. To turn a light off you can make a button that fire an output telling the light to turn off.

Input I'll call input the act of receive an order and do it. If a button tells the light to turn off via a output the light will turn off (input).

Creating an Output

First create a light a give it a name.. I'll use "Light" (without the quotes)

Now We're gonna create the output. Just create a brush a make it a func_button... Then go to Outputs border and click in Add...

Ok, lets see the use of each field:

My Output Named Here you set the way to fire the output. In this case "OnPressed" (if you choose "OnDamaged" the button will fire the output when damaged ...)

Targets Entities Named The targeted entity... here Light

Via This Input The action, what the button will make the light do? choose TurnOff to turn the light off... (In this tutorial the light will spawn "On" )

With a parameter override of Not used in this case... (It is used to set other kind of input like if you wanna kill a citizen (npc_citizen) via a button (output) you will use the input "SetHealth" and here will set 0 (0 is the life of the npc after the output).

After a Delay in Seconds of If you want a delay before firing the output this is the place.

Once Only Mark this option and the output will be fired just one time.


The Input

The Input border shows to you information about the output that the light is receiving. If you double click in the input will be redirected to the output's entity properties.


Just remember that the output is the order given to an entity and input is the act of receiving and doing the output. There are other outputs like OnDamaged, Display.... just create the output set the target and choose the output. (most of them are self explanatory)..

I hope you understand it.

- Don't send PM's to this user -
Not A Real User
Joined: Sun Mar 06, 2005 11:00 pm

Re: Input/Output System

Postby kennyrogers on Sat Oct 23, 2010 1:40 pm

Hi i know you don't want PM's so i was wondering (If you still read ur comments). Is it possible to make a button that can respawn something?

For example, if i shot a box and it broke, how would i make a button that would make the box come back?
Just Joined
Just Joined
Joined: Sat Oct 23, 2010 1:38 pm

Re: Input/Output System

Postby LordDz on Sat Oct 23, 2010 9:16 pm

Make a button, then use a point_template with a prop_physics with the crate model?
User avatar
May Contain Skills
May Contain Skills
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Input/Output System

Postby shazichapi on Mon Jan 30, 2012 11:37 am

Very informational and educational as usual!
Just Joined
Just Joined
Joined: Mon Jan 30, 2012 11:27 am

Return to Tutorials

Who is online

Users browsing this forum: No registered users