ENTITY:StoreOutput

From Garry's Mod
Jump to: navigation, search
 ENTITY:StoreOutput( )

Contents

Description

Used to store an output so it can be triggered with ENTITY:TriggerOutput. Outputs compiled into a map are passed to entities as key/value pairs through ENTITY:KeyValue.

TriggerOutput will do nothing if this function has not been called first.

Arguments

string name

Name of output to store

Arguments

string info

Output info

Examples

Example

Stores all outputs that are assigned to an entity in Hammer.

function ENT:KeyValue( k, v )
	-- 99% of all outputs are named 'OnSomethingHappened'.
	if ( string.Left( k, 2 ) == "On" ) then
		self:StoreOutput( k, v )
	end
end


Personal tools
Navigation