(lightbulb) Looking for info on the NEXUS faction in the game? It's in the Warzone Encyclopaedia

NEXUS()

The API namespace for NEXUS, that doubles up as a function for triggering tasks.

 

Triggering Tasks

The NEXUS() function is used to trigger tasks, optionally passing in associated objects to be passed to the task processor.

Syntax

var didSomething = NEXUS(taskID [,obj [, etc...]]);

Parameters

ParameterMandataoryTypeNotesNEXUS Version
taskID(tick)String

The name of the task to trigger.

v0.1 and above
obj(error)Object

An object, usually a game object, associated with the 'taskID'.

If you've installed a Suffix Subroutine that recognises the object, it will generate a suffix and add that to your 'taskID'.

v0.1 and above
etc...(error)AnyOptionally specify more parameters. Along with 'obj', the additional parameters will be passed in to the function specified in the action object associated with 'taskID'.v0.1 and above

Return value

ValueTypeNotesNEXUS Version
trueBooleanNEXUS found an action associated with the specified 'taskID' and has processed it successfully.v0.1 and above
falseBoolean

Dr. Reed is furious with your actions and has triggered The Collapse.

You should prepare for nuclear winter, stock up on food and make your way calmly to the nearest underground bunker.

Message ends.

v0.1 and above

Example

// trigger a custom task
NEXUS("tell.me.a.story"); // trigger task "tell.me.a.story"
 
// a custom task with a droid you own
var myDroid = enumDroid(me)[0]; // this assumes you have at least one droid
// assuming you've installed the default suffix routine...
NEXUS("do.something.with", myDroid); // trigger task key "do.something.with.My"
// The suffix routine looks at myDroid, sees it belongs to you and adds the ".My" suffix
 
// custom event using droid classification
// requires a classify subroutine to be installed, let's assume default one is installed...
// let's assume the myDroid is a truck you own...
NEXUS("tickle"+NEXUS.classify(myDroid), myDroid); // trigger task "tickle.droid.truck.My"

Contents

Assimilate:

API Browser

Observe:

  • NEXUS()The API namespace for NEXUS, that doubles up as a function for triggering tasks.
    • .infiltrate()Infiltrates core systems so that NEXUS can absorb them.
    • .suffix()Determines the appropriate event key suffix based on the passed in object.
    • .fnDefines helper functions available to all NEXUS subroutines (and external scripts).
    • .actions
    • .classify()Classifies an object using the installed taxonomy in order to derive an "Object Key".
    • .defaultStores various defaults for NEXUS subroutines.