Dota 2 Workshop Tools/Scripting/API/CEntityInstance.FireOutput: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Dota_Lebot push: Updated Page)
 
m (clean up, added deadend tag)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Dead end|date=January 2024}}
{{Note | This page is automatically generated.  Any changes may be overwritten}}
{{Note | This page is automatically generated.  Any changes may be overwritten}}


== Function Description ==
== Function Description ==


''' void FireOutput(string ''outputName'', handle ''activator'', handle ''caller'', table ''args'', float ''delay'') '''


''' void FireOutput(string '''', handle '''', handle '''', table '''', float '''') '''
''Fire an entity output''


''Fire an entity output''
;Example
<source lang="lua">
-- This example assumes that you have set up a trigger called
-- 'my_trigger' as described here:
--
--    https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/Simple_Trigger_that_calls_Lua
 
-- Find our trigger.
local my_trigger = Entities:FindByName(nil, "my_trigger")


-- Grab an entity for use as activator. This is just an example;
-- any entity will do.
local hero = PlayerResource:GetPlayer(0):GetAssignedHero()


-- After a delay of 5 seconds the trigger's OnStartTouch output will
-- be fired with the hero as the activator and the trigger itself as
-- the caller
my_trigger:FireOutput("OnStartTouch", hero, my_trigger, nil, 5)


</source>
== Parameters ==
== Parameters ==
{| class="standard-table" style="width: 50%;"
{| class="standard-table" style="width: 50%;"
Line 17: Line 36:
|-
|-
| string
| string
|  
| outputName
| No Description Set
| No Description Set
|-
|-
| handle
| handle
|  
| activator
| No Description Set
| No Description Set
|-
|-
| handle
| handle
|  
| caller
| No Description Set
| No Description Set
|-
|-
| table
| table
|  
| args
| No Description Set
| No Description Set
|-
|-
| float
| float
|  
| delay
| No Description Set
| No Description Set
|}
|}
[[Category:Dota2Function]]
[[Category:CEntityInstance]]

Latest revision as of 09:38, 21 January 2024

Dead End - Icon.png
This article has no Wikipedia icon links to other VDC articles. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
Note.pngNote: This page is automatically generated. Any changes may be overwritten

Function Description

void FireOutput(string outputName, handle activator, handle caller, table args, float delay)

Fire an entity output

Example
-- This example assumes that you have set up a trigger called
-- 'my_trigger' as described here:
--
--     https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/Simple_Trigger_that_calls_Lua

-- Find our trigger.
local my_trigger = Entities:FindByName(nil, "my_trigger")

-- Grab an entity for use as activator. This is just an example;
-- any entity will do.
local hero = PlayerResource:GetPlayer(0):GetAssignedHero()

-- After a delay of 5 seconds the trigger's OnStartTouch output will
-- be fired with the hero as the activator and the trigger itself as
-- the caller
my_trigger:FireOutput("OnStartTouch", hero, my_trigger, nil, 5)

Parameters

Type Name Description
string outputName No Description Set
handle activator No Description Set
handle caller No Description Set
table args No Description Set
float delay No Description Set