Skip to content

Walker

The player’s character in a point-and-click adventure, with no code: a click on the floor (a WalkArea) walks there, round whatever’s in the way along the shortest way; a click off it walks as close as it can; a click on a Hotspot walks over to it and uses it, a right click looks at it. The pointer shows the name of what’s under it and changes over things to click. It says what it sees over its head, faces the way it walks, and plays its Animation’s Walk and Idle clips if it has them (and WalkUp, WalkDown, IdleUp and IdleDown, going up or down the screen). Its feet are the bottom of its sprite (or its position without one), drawn smaller further up a walk area that scales with depth. A click or tap also moves dialogue on, so the whole game plays with the mouse or a touch screen.

Part of the Adventures module: Point-and-click adventures: walk areas a character finds its way round (WalkArea), the character that walks where the player clicks (Walker), things to look at and use (Hotspot), and items to pick up, use on things (UseWith) and put together (InventoryBar), with Create Walk Area, Create Hotspot, Create Walker and Create Item in the Entity menu.

It takes clicks while it’s Controllable, which Focus hands over (an adventure inside another game). Its Verb is what a left click on a hotspot does: buttons whose Action is Do can switch it (Choose Look, Choose Use) for a verb bar. With an InventoryBar, an item picked from it and clicked on a hotspot is used there. The keys and a controller play it too: left and right go from hotspot to hotspot in view, its UseAction and LookAction use or look at the one they’re on, and its ItemsAction goes over to the inventory bar. A trigger or script can walk it with Walk To, stop it and make it say something. It ignores gravity. In a network game, each player’s walker answers to their own mouse and keys, and the host walks it.

Works with: WalkArea (in the scene: where it can walk); Hotspot (in the scene: things to look at and use); Animation (plays Walk and Idle clips)

Takes the player’s input only while it has focus (its Controllable): its Focus action hands it the input and takes it from everything else the same player plays.

Changes how its entity is drawn (a tint, a shake or drawing it on top).

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.

  • speed: a number = 3. World units per second (slower further up a walk area that scales with depth). (Field: a number.)
  • flipSprite: true or false = true. Flip its sprite to face left or right as it walks (art should face right). (Field: on or off.)
  • controllable: true or false = true. Whether it walks where the player clicks. Untick it (from a script, in a cutscene) to ignore clicks; Walk To still works. Its Focus action ticks it and unticks it on everything else the player plays. (Field: on or off.)
  • verb: one of Use, Look = “Use”. What a left click on a hotspot does: use it, or look at it. A verb bar’s buttons switch it with Choose Look and Choose Use. (Field: one of its values.)
  • rightClickLooks: true or false = true. A right click on a hotspot looks at it, whatever the Verb. (Field: on or off.)
  • camera: text = null. The camera whose view its clicks are read through, for an adventure seen through a Viewport. Empty is the main view. (Names an entity.) (Field: an entity’s name.)
  • useAction: text = “Jump”. The input action that, played with the keys or a controller, uses the hotspot they’re on (with the item picked from the inventory bar, if any), or picks the item they’re on in the bar: “Jump” is Space or the gamepad’s A. The arrows, A and D, the d-pad or the stick go from one hotspot (or item) to the next. (Names an input action.) (Field: a name.)
  • lookAction: text = “Attack”. The input action that looks at the hotspot or item the keys are on: “Attack” is X, L or the gamepad’s X. (Names an input action.) (Field: a name.)
  • itemsAction: text = “Interact”. The input action that takes the keys to the inventory bar and back: “Interact” is E, Enter or the gamepad’s Y. (Names an input action.) (Field: a name.)
  • cancelAction: text = “Dash”. The input action that puts back the item on the pointer, or leaves the bar: “Dash” is Shift or the gamepad’s B. (Names an input action.) (Field: a name.)
  • speechColor: a color, “#RRGGBB” or “#RRGGBBAA” = “#FFFFFFFF”. The color of what it says, over its head. (Field: a color.)
  • sayTime: a number = 1.5. Seconds a line it says stays up, and a twentieth of a second more for each letter. A click moves on sooner. (Field: a number.)
  • showNames: true or false = true. Shows the name of what’s under the pointer by it. (Field: on or off.)
  • nameColor: a color, “#RRGGBB” or “#RRGGBBAA” = “#FFE16AFF”. The color of the name shown by the pointer. (Only used when showNames is on.) (Field: a color.)
  • saveRoomAs: text = null. Keeps the scene it’s in in the game’s save data under this name, e.g. “Room”, as it gets there, so the menu’s Play button (a Load Scene button whose Saved Scene is this name) carries on in the room the player left. Empty keeps nothing. (Names a name in the save data: this entity’s own, which other fields can name.) (Field: a name.)
  • route: text = null. Where it’s still to walk, in the world: “x y” points separated by semicolons, the last where it stops. Empty while it stands. The game sets it as it walks. (Plain text: where it’s still to walk: the game sets it.) (Field: text.)
  • heading: text = null. The entity of the hotspot it’s walking over to, to look at or use once it’s there; empty for none. (Plain text: the hotspot it’s walking to: the game sets it.) (Field: text.)
  • headingVerb: one of Use, Look = “Use”. What it does with the hotspot it’s walking to (Heading) once it gets there. (Field: one of its values.)
  • headingItem: text = null. The item it’s going to use on the hotspot it’s walking to (Heading); empty to just use or look at it. (Plain text: the item it’s taking there: the game sets it.) (Field: text.)
  • pointed: text = null. The entity of the hotspot the keys or a controller are on, to use or look at with their Use and Look actions; empty while they’re not (the mouse is in use). (Plain text: the hotspot the keys are on: the game sets it.) (Field: text.)
  • facing: [x, y] = [-0,-1]. The way it faces, as a unit vector: down to start with. The game sets it as it walks. (Field: a vector.)
  • said: text = null. What it’s saying, over its head; empty for nothing. Read as the “Said” output. (Plain text: what it’s saying: the game sets it.) (Field: text.)
  • sayLeft: a number = 0. Seconds before what it’s saying goes. Counted down where the game is run (its line goes from every screen then). (Not sent in a network game: each machine has its own.) (Field: a number.)

What anything can make it do with no code: a Trigger’s do when its message arrives, a Contraptions Wire’s input as its signal comes on, a script’s Game.Do(entity, “Name”).

  • WalkTo (done with a name, its place: a trigger’s with). Walks to place: an entity’s name (a hotspot’s stand point, or where anything else is), or a point in the world, “x, y”. Round whatever’s in the way, as a click does, and whether or not it’s Controllable.
  • Stop. Stops where it is, forgetting where it was going and what it would do there.
  • Say (done with a name, its line: a trigger’s with). Says line over its head, as it does a hotspot’s line.
  • ChooseLook. Makes a left click on a hotspot look at it, for a verb bar’s Look button.
  • ChooseUse. Makes a left click on a hotspot use it, for a verb bar’s Use button.
  • Focus. Gives its entity the player’s input: whatever there and inside it has focus, and everything else the same player plays loses it (a platformer’s player stops on the arrow keys while a board takes them).

What anything can read with no code: a Counter’s, Bar’s or Text’s output, a Contraptions Wire’s output as its signal; Text shows names too, the rest read numbers, true as 1.

  • Said (a name). What it’s saying, over its head; empty for nothing. Read as the “Said” output.
  • Hovered (a name). The name of the hotspot under the pointer, on this machine; empty for none. Read as the “Hovered” output.
  • Verb (a name). The Verb as a name, “Use” or “Look”, for a text on a verb bar.

Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.

  • hovered: text. The name of the hotspot under the pointer, on this machine; empty for none. Read as the “Hovered” output.
  • verbName: text. The Verb as a name, “Use” or “Look”, for a text on a verb bar.
  • isWalking: true or false. True while it’s walking somewhere.
  • hoveredHotspot: an entity with a Hotspot: its name, id or path. The hotspot under the pointer on this machine, or null.
  • hoveredItem: text. The item on its InventoryBar under the pointer on this machine, or null.
  • feet: [x, y]. Where its feet are in the world: the middle of the bottom of its sprite (as the transform places it), or its position without one. It’s its feet that walk on a walk area.

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