s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejams
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Api
Classes
BaseTask
chevron_left Classes
class
BaseTask

Constructors

lockBaseTask

Properties

lockNpclockStatus

Methods

lockOnEndlockOnStartlockOnUpdatelockReset
BaseTask
One step of a Sandbox.Npcs.Schedules.BaseSchedule.
class Sandbox.Npcs.Tasks .
abstractSandbox.Engine

build Constructors 1

BaseTask ()

data_object Properties 2

Npc
BaseNpc
The NPC running this task.
Status
TaskResult
What is the current status of this task? In Sandbox.Npcs.Tasks.BaseTask.OnEnd it is how the task ended: Sandbox.Npcs.Tasks.TaskResult.Failed when it was cut short while still running.

functions Methods 4

OnEnd ()
The task is over, whether it finished or was cut short. Sandbox.Npcs.Tasks.BaseTask.Status says which.
OnStart ()
Called once when the task becomes its schedule's current task.
OnUpdate ()
TaskResult
Called every update while the task runs: return Sandbox.Npcs.Tasks.TaskResult.Running to keep going, or how it ended.
Reset ()
Called right after Sandbox.Npcs.Tasks.BaseTask.OnEnd, to clear whatever state the task kept while it ran.

Inheritance

BaseTask
FireWeaponTask
LookAtTask
MoveToTask
SayTask
WaitTask
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter