Skip to content

Resource

Something workers gather: a gold mine, a tree. Each trip takes a load away; when Amount runs out it’s gone. Give it a sprite and a collider (or a sprite alone) the size it covers; units walk around it.

Part of the Strategy module: Real-time strategy: factions, units that walk around obstacles and fight, workers that gather and build, buildings that train units, fog of war, the computer playing a side, the player’s controls and HUD, playing online team against team, and the Strategy template.

Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.

  • kind: text = “Gold”. What it gives, e.g. “Gold” or “Wood”: an item, the same as a pickup’s or an inventory’s (see Items). (Names an item: this entity’s own, which other fields can name.) (Field: a name.)
  • amount: a whole number = 1500. How much is left. (Field: a number.)
  • blocks: true or false = true. Whether units walk around it. Untick it for something they can stand on. (Field: on or off.)

Scripts use it as Resource: its methods, events and values that aren’t saved with the scene.