kinds.module
README.md
kinds
The objective kinds. Ten are built in: goto, collect, defeat, talk, use, escort, defend, deliver, find, inspect. A game adds its own with Quest.defineObjective(kind, def) (the same call the built-ins use) without editing the kit:
| def field | meaning |
|---|---|
validate(o) -> string? | return "field: message" when an objective of this kind is written wrong |
total(o) -> number | how much progress completes it (default o.count) |
matches(o, target, info) -> boolean | whether a Quest.report(kind, target, n) counts for it (default: o.target is empty or equal) |
tick(ctx, dt) | called every frame while the objective is active on the machine in charge; ctx.set(n), ctx.add(n), ctx.complete(), ctx.fail(reason), ctx.avatar(), ctx.position(name) |
extra | "countdown" or "health": the tracker extra it shows |
icon | navUiKit icon for its waypoint |