By Wertandrew (Oct 2014)
Copied from Project Spark.com on Wayback Machine
- Some logic only needs to happen once when triggered, this is what the [Started to] tile does.
- [Started to] tile can be used on its own in the WHEN side to make the DO side only run once per activation of the parent.
- [Create] tile: Always use it with [Started to]
- Most of the sounds and visual effects in prop gallery will play once when used with the [started to] tile. This page lists which can be used with it (PS Wiki).
- The [started to] tile is equivalent of 1 game frame, which in duration is WHEN [Duration][1][in frames].
- If used inside a boolean, it will activate the DO section once every time the section is activated:
WHEN [Test Boolean]=[true] DOWHEN [Started to] DO [Jump]which will make the player jump once every time the test boolean is true. In short: WHEN [started to][Test Boolean]DO[jump] will have the same effect.
- [Once] tile only runs once per created brain that contains it and cannot be reset in that brain. This is useful, for example, at the start of a game to initialize variables.
- If you are having trouble with music not changing properly, use [started to] every time you switch.
- [Started to] needs to be embedded into a child line when using timers:
WHEN [countdown timer][3] DOWHEN [started to] DO [play sound][etc] - [Started to] works best for custom events and cutscenes, in combination with switching pages:
PAGE 1:
WHEN [In trigger zone][player] DO [switch page][2]
PAGE 2:
WHEN [Started to] DO [Create][Goblin]
which creates one goblin when the player is in the trigger zone of the prop. - Always use [Started to] to toggle variables and avoid them being left constantly at a state (True/False) as it may break your logic later on.