storage.save

Section: Storage

What it does

storage.save acts on storage: it saves. It takes key and value.

The API says: JSON-serialized localStorage

Signature

storage.save(key, value)

Arguments

  • key
  • value

Example · generated

function start() {  storage.save('w', 1);}

storage.save is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.

6 members in storage