VoidExpanse/scope-npc
Scope npc
Manages NPC bahavior, interactions and parameters.
Visibility: Global.
List of functions
Objectives
CountObjectives | ||
---|---|---|
Arguments | Returns | Example |
|
int: current number of objectives |
var obj = npc.CountObjectives(25334); |
Description | ||
AddObjective | ||
---|---|---|
Arguments | Returns | Example |
|
void |
npc.AddObjective(25334, "go_to_jumpgate", {jumpgate_id: 15}); |
Description | ||
Adds new objective to npc. All objectives must be implemented in npc's behavior script. NOTE: in object parameters there shouldn't be parameters "name" - it will be overriden by name of objective. |
CleanObjectives | ||
---|---|---|
Arguments | Returns | Example |
|
void |
npc.CleanObjectives(25334); |
Description | ||
Removes all objectives from npc ship. |
NextObjective | ||
---|---|---|
Arguments | Returns | Example |
|
void |
npc.NextObjective(25334); |
Description | ||
Moves current objective pointer to next position, removes previous objective. |
GetCurrentObjective | ||
---|---|---|
Arguments | Returns | Example |
|
object:
|
var objective = npc.GetCurrentObjective(25334); |
Description | ||
Gets current npc's objective (or null if none) |
GetCurrentObjectiveTimer | ||
---|---|---|
Arguments | Returns | Example |
|
double: time - how long npc is doing his current objective |
var time = npc.GetCurrentObjectiveTimer(25334); |
Description | ||