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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
EntityAuthority |
worker |
Entity |
addWorkerOptions |
AddWorkerOptions |
Returns
Section titled “Returns”void
Example
Section titled “Example”useAuthorityEffect((authority) => addWorker(authority, npc), [npc]);