Lane
A pinball rollover lane, with no code: a ball rolling through it scores its Points and lights it up. Once every lane in its set (those inside the same entity) is lit, the set scores its CompletePoints and sends CompleteMessage, and they all go out ResetAfter seconds later. Pressing a flipper moves the lit lanes along, one lane left or right (FlipperChanges), to line the gap up with the ball.
Part of the Physics Games module: Physics puzzlers: a Slingshot to pull back and launch shots from, and Breakable things (planks, panes, blocks, pigs) that crack and break on hard knocks; a LevelGoal that wins a level once its targets are down (with a bonus for the shots left, and one to three stars) or loses it once the shots run out; a Slingshot and a Tower to make from the Entity menu (Genres, Physics Games); and the Physics template, levels of wood, glass and stone to knock down.
Put it on a trigger the ball rolls through, at least a ball’s width long. Unlit, its sprites are drawn darker. Its Lit and Passes outputs are for a wire or a Counter; nothing counts while a Tilt covering it has tilted.
Requires: Collider (a trigger the ball rolls through)
Works with: Counter (keeps the score from its Message (on another entity))
Changes how its entity is drawn (a tint, a shake or drawing it on top).
Properties
Section titled “Properties”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.
points: a whole number = 100. What a ball rolling through scores: the data its Message carries. 0 sends the entity. (Field: a number.)message: text = “Score”. A message sent with Game.Send as a ball rolls through, with its Points as its data. (Names a message.) (Field: a name.)layers: text = null. The collision layers that light it, e.g. “Ball”. Empty is any body (but flippers). (Names collision layers: their names, separated by commas.) (Field: a name.)sound: text = null. A sound played as a ball rolls through, e.g. “Sounds/rollover.wav”. (A sound in Assets, e.g. “Sounds/hit.wav”.) (Field: a sound.)flipperChanges: true or false = true. Pressing a flipper moves the lit lanes of its set along: the left flipper one lane to the left, the right one to the right (round from the end to the other), so the player lines up the unlit one with where the ball will go. (Field: on or off.)
completePoints: a whole number = 1000. What lighting every lane in its set (those inside the same entity) scores, as the data of its Complete Message. (Field: a number.)completeMessage: text = “Score”. A message sent as every lane in its set is lit, with the set’s points as its data, e.g. “Score”. (Names a message.) (Field: a name.)resetAfter: a number = 1. Seconds after its set is complete before they all go out; 0 leaves them lit (until Reset). (Field: a number.)
lit: true or false = false. True once a ball has rolled through, until its set goes out (or its Reset action). (Field: on or off.)passes: a whole number = 0. How many times a ball has rolled through. (Field: a number.)occupied: true or false = false. True while something is in it (so a ball sitting in it counts once). Set by the game. (Field: on or off.)resetIn: a number = 0. Seconds until its set goes out; 0 when it isn’t due to. Set by the game. (Field: a number.)
Actions
Section titled “Actions”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”).
Light. Lights it as if a ball rolled through, scoring nothing (a set completed this way still scores).Reset. Puts it out.
Outputs
Section titled “Outputs”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.
Lit(true or false). True once a ball has rolled through, until its set goes out (or its Reset action).Passes(a whole number). How many times a ball has rolled through.
Scripts use it as Lane: its methods, events and values that aren’t saved with the scene.