Action: Goto(label ID)

Related Actions: gosub, gosubrandom, goto, gotorandom, repeat, exitloop, exitevent
Related Events: label
See also: FKiSS, Events, Actions

goto(label ID)

First defined in: FKiSS3
Processing immediately jumps from this action to the specified label. When that label finishes, processing of the current event does not continue.

label ID

In FKiSS3, label ID may be a label ID number or a variable representing a label ID number.
In FKiSS4, label ID may be a label ID (number or symbolic name) or a variable representing a label ID number.

Example:

This example shows how to use the goto() action to to test for two possible conditions and if either is true, then the actions starting at the label GloveOrBootMapped are executed to play a sound; otherwise, a different sound is played.
;@ ifmapped(#4)
;@   goto(GloveOrBootMapped)
;@ endif()
;@ ifmapped(#5)
;@   goto(GloveOrBootMapped)
;@ endif()
;@ sound("BareLimbs.wav")

;@ label(GloveOrBootMapped)
;@   sound("GloveSound.wav")