Difference between revisions of "Script:Persist.js"

From Spherical
Jump to: navigation, search
(created from http://web.archive.org/web/20100621061805/http://www.spheredev.org/wiki/Persist.js)
(No difference)

Revision as of 02:53, 2 June 2013

persist.js lets you store variables in persons and maps, and use them in event scripts.

At its simplest, you can store simple quest information, e.g. if you've talked to an NPC, or collected an item. Power users can take full advantage of JavaScript, and write templates for common person patterns, e.g. one-line townsfolk, store keepers, inn keepers, save points, chests, items, door switches, bosses blocking passages, and warps.

It helps you to organise your game data. If you ever got sick of making global variables and confusing data structures to hold your game info, this is your answer.

Download

Quick start

Reference

How to…