Garry's Mod Wiki


The object returned by ai_schedule.New.


Schedule:AddTask( string taskname, any taskdata )
Adds a task to the schedule. See also Schedule:AddTaskEx if you wish to customize task start and run function names. See also ENTITY:StartSchedule, NPC:StartEngineTask, and NPC:RunEngineTask.
Schedule:AddTaskEx( string start, string run, number data )
Adds a task to the schedule with completely custom function names. See also Schedule:AddTask.
Schedule:EngTask( string taskname, number taskdata )
Adds an engine task to the schedule.
Schedule:GetTask( number num )
Returns the task at the given index.
Schedule:Init( string debugName )
This is used internally - although you're able to use it you probably shouldn't. Initialises the Schedule. Called by ai_schedule. New when the Schedule is created.
number Schedule:NumTasks()
Returns the number of tasks in the schedule.