Garry's Mod Wiki

ENTITY:SelectSchedule

ENTITY:SelectSchedule( number iNPCState )

Description

Set the schedule we should be playing right now.

This hook only exists for ai type SENTs

Arguments

1 number iNPCState

Example

Creates a new schedule and assigns it to a scripted NPC.

local schdTest = ai_schedule.New( "Test Schedule" ) schdTest:EngTask( "TASK_GET_PATH_TO_RANDOM_NODE", 128 ) schdTest:EngTask( "TASK_RUN_PATH", 0 ) schdTest:EngTask( "TASK_WAIT_FOR_MOVEMENT", 0 ) function ENT:SelectSchedule() self:StartSchedule( schdTest ) end
Output: The scripted NPC will run around when spawned.

Page Links


Special Pages


Wikis

?

Render Time: 65ms

DB GetPage 39
Generate Html 2
SaveChanges (1) 10
Render Body 0
Render Sidebar 11