ai_task.New

From GMod Wiki

Jump to: navigation, search
Function
Syntax ai_task.New( )
Where is this used?
Description:
Create a new empty task for use with scripted npcs
Returns: Table
Part of Library: ai_task
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Ai task.New]Ai task.New [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionDefining a new lua task.
Used onNewerServer.png
Code
 
function Schedule:AddTaskEx( _start, _run, _data_ ) 
 
        local NewTask = ai_task.New() 
        NewTask:InitFunctionName( _start, _run, _data_ ) 
        self.TaskCount = table.insert( self.Tasks, NewTask ) 
 
end
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox