Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

addWorker

addWorker(writer, worker, addWorkerOptions?): void

Marks worker as one that takes orders, as addCarrier marks a carrier: an NPC, or a player’s character. An NPC’s routines are built with takeOrders, which it checks; an NPC with no routines, which its game moves itself, takes orders too, and the game walks it to each stage’s stand. A player’s character is walked by its player’s page, with the walk a click to walk sends, and the player’s own walk or steer ends the order Cancelled, as Diablo’s click to interact gives way to the next click.

Parameter Type
writer EntityAuthority
worker Entity
addWorkerOptions AddWorkerOptions

void

useAuthorityEffect((authority) => addWorker(authority, npc), [npc]);