Dota 2 Workshop Tools/Scripting/API/Global.LinkLuaModifier: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Undo revision 192023 by RoyAwesome (talk))
(Dota_Lebot push: Updated Page)
Line 6: Line 6:




''' void LinkLuaModifier(string ''modifier_name'', string ''file_path'', int ''motion_controller_type'') '''
''' void LinkLuaModifier(string ''string_1'', string ''string_2'', int ''int_3'') '''


''Link a lua-defined modifier with the associated class. If the modifier is located within the root vscript folder, then the second argument (file_path) may be omitted'
''Link a lua-defined modifier with the associated class.''






;Examples
;Example
Note: ''modifier_pudge_meat_hook.lua located in \vscripts\''
<source lang="lua">
<source lang="lua">
LinkLuaModifier( "modifier_pudge_meat_hook", LUA_MODIFIER_MOTION_HORIZONTAL )
function LinkLuaModifier( string_1, int_2 ) end
unit:AddNewModifier(source, ability, "modifier_pudge_meat_hook", {})
</source>
</source>
Note: ''modifier_filepath_test.lua located in \vscripts\test\''
<source lang="lua">
LinkLuaModifier( "modifier_filepath_test", "test/modifier_filepath_test", LUA_MODIFIER_MOTION_NONE )
unit:AddNewModifier(source, ability, "modifier_filepath_test", {})
</source>
== Parameters ==
== Parameters ==
{| class="standard-table" style="width: 50%;"
{| class="standard-table" style="width: 50%;"
Line 33: Line 23:
|-
|-
| string
| string
| modifier_name
| string_1
| Name to be registered for the modifier, to be used when adding it.
| No Description Set
|-
|-
| string
| string
| file_path
| string_2
| File path of the .lua file containing the code for the modifier.
| No Description Set
|-
|-
| int
| int
| motion_controller_type
| int_3
| The type of motion controller(s) to be registered by this modifier
| No Description Set
* LUA_MODIFIER_MOTION_NONE
* LUA_MODIFIER_MOTION_HORIZONTAL
* LUA_MODIFIER_MOTION_VERTICAL
* LUA_MODIFIER_MOTION_BOTH
* LUA_MODIFIER_INVALID
|}
|}

Revision as of 17:32, 30 June 2015

Note.pngNote: This page is automatically generated. Any changes may be overwritten

Function Description

void LinkLuaModifier(string string_1, string string_2, int int_3)

Link a lua-defined modifier with the associated class.


Example
function LinkLuaModifier( string_1, int_2 ) end

Parameters

Type Name Description
string string_1 No Description Set
string string_2 No Description Set
int int_3 No Description Set