Ai schedule.NumTasks

From GMod Wiki

Jump to: navigation, search
Function
Syntax ai_schedule:NumTasks( )
Where is this used?
Description:
Returns the number of tasks.
Returns: Integer
Part of Library: ai_schedule
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Ai schedule.NumTasks]Ai schedule.NumTasks [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGets the number of tasks in an AI Schedule.
Used onNewerServer.png
Code
local testSchedule = ai_schedule.New( "AIFighter Chase" )
 
testSchedule:EngTask( "TASK_GET_PATH_TO_RANDOM_NODE", 128 )
testSchedule:EngTask( "TASK_RUN_PATH", 0 )
testSchedule:EngTask( "TASK_WAIT_FOR_MOVEMENT", 0 )
 
print( testSchedule:NumTasks() )
Output3
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox