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

readCoins

readCoins(entity): number

The coins in the entity’s wallet, 0 where it has none: what a shop’s when checks against a price, readCoins(player) >= price. A read, so it takes no authority and runs on a page as well as in a room. In a view, useWallet() reads the player’s coins.

Parameter Type
entity Entity

number