Noir
  • πŸšΆβ€β™‚οΈIntro
  • πŸ“Tutorials
    • πŸŽ“Starting Noir
    • πŸ“–Libraries
    • πŸ–₯️Services
    • ❔Libraries VS Services
    • πŸ’¬Callbacks
    • πŸ’₯Classes
    • πŸ”ŽDebugging
  • πŸ“šExamples
  • β˜„οΈAPI Reference
    • Bootstrapper
    • Built-Ins
      • Classes
        • AITarget
        • Body
        • Command
        • Connection
        • Event
        • HTTPRequest
        • HTTPResponse
        • Library
        • Message
        • Object
        • Player
        • Service
        • Task
        • TickIterationProcess
        • Tracker
        • Vehicle
        • Widgets
          • MapLabelWidget
          • MapLineWidget
          • MapObjectWidget
          • PopupWidget
          • ScreenPopupWidget
          • Widget
      • Libraries
        • Base64
        • Dataclasses
        • Deprecation
        • Events
        • HTTP
        • JSON
        • Logging
        • Matrix
        • Number
        • String
        • Table
      • Services
        • CommandService
        • GameSettingsService
        • HTTPService
        • MessageService
        • NotificationService
        • ObjectService
        • PlayerService
        • TaskService
        • TPSService
        • UIService
        • VehicleService
    • Callbacks
    • Class
    • Classes
    • Debugging
    • Definition
    • Libraries
    • Noir
    • Services
    • TypeChecking
Powered by GitBook
On this page
  • Parameters
  • Parameters
  • Parameters
  • Parameters
Edit on GitHub
  1. API Reference
  2. Built-Ins
  3. Classes

Task

Noir.Classes.Task: NoirClass

Represents a task.


Noir.Classes.Task:Init(ID, taskType, duration, isRepeating, arguments, startedAt)

Initializes task class objects.

Parameters

  • ID: integer

  • taskType: NoirTaskType

  • duration: number

  • isRepeating: boolean

  • arguments: table<integer, any>

  • startedAt: number


Noir.Classes.Task:SetRepeating(isRepeating)

Sets whether or not this task is repeating.

If repeating, the task will be triggered repeatedly as implied.

If not, the task will be triggered once, then removed from the TaskService.

Parameters

  • isRepeating: boolean


Noir.Classes.Task:SetDuration(duration)

Sets the duration of this task.

Parameters

  • duration: number


Noir.Classes.Task:SetArguments(arguments)

Sets the arguments that will be passed to this task upon finishing.

Parameters

  • arguments: table<integer, any>


Noir.Classes.Task:Remove()

Remove this task from the task service.

PreviousServiceNextTickIterationProcess

Last updated 2 months ago

β˜„οΈ