[Started To] Tile Tutorial by Wertandrew2

Have something important that other people might find usefull? Well, drop it here and help others!
User avatar
LucidStew
Level 3
Level 3
Posts: 180

[Started To] Tile Tutorial by Wertandrew2

Post#1 » Mon Aug 15, 2016 7:45 am

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] DO
WHEN [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] DO
WHEN [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.
End of line.

Return to “Tutorials and guides”

Who is online

Users browsing this forum: No registered users and 1 guest

cron