Control Blocks

Conditionals

{"func":"blockControlIf"}

If

"If" Flow block runs the code inside it only if the given condition is true.

Parameters:

Condition: This parameter should be a boolean value that determines whether or not the code inside the "if" block runs.

Related Blocks:
{"func":"blockControlIfElse"} ,     {"func":"valueControlIfElse"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockControlForeverIf","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}],"next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]},{"type":"string","value":"5"}]}],"containers":[{"func":"blockMotionTurnCW","values":[{"type":"string","value":"15"}]}]}}}]}} Add to my Backpack


{"func":"blockControlIfElse"}

If Else

"If Else" Flow block runs the code inside the "if" if the parameter is true and the code inside the "else" if the parameter is false (but not both).

Parameters:

Condition: This parameter should be a boolean value that determines whether the code inside the "if" or "else" part runs.

Related Blocks:
{"func":"blockControlIf"} ,     {"func":"valueControlIfElse"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIfElse","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithSprite","values":[{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockControlPostMessageAndWait","values":[{"type":"string","value":"Add Point"},{"type":"string","value":"any"},{"type":"wrapper","func":"valueVar","name":"CurrentScore"}]},{"func":"blockControlPostMessage","values":[{"type":"string","value":"Subtract Point"},{"type":"string","value":"stage"},{"type":"wrapper","func":"valueVar","name":"CurrentScore"}]}]}} Add to my Backpack


{"func":"valueControlIfElse"}

If Then Else

"If Then Else" returns the second parameter if the first parameter is true, and the third parameter if the first parameter is false.

Parameters:

Condition: This parameter should be a boolean value that determines which of the next two parameters will be returned.

Return Value 1: This parameter will be returned if the condition parameter is true.

Return Value 2: This parameter will be returned if the condition parameter is false.

Related Blocks:
{"func":"blockControlIf"} ,     {"func":"blockControlIfElse"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueControlIfElse","values":[{"type":"wrapper","func":"valueVar","name":"Playing"},{"type":"string","value":"Pause"},{"type":"string","value":"Play"}]}]}} Add to my Backpack


{"func":"blockControlIf"}

Si

El bloque de flujo "si" ejecuta el código que contiene solamente si la condición dada es verdadera.

Parameters:

Condición: este parámetro es un valor booleano que determina si se ejecuta o no el código dentro del bloque "si".

Related Blocks:
{"func":"blockControlIfElse"} ,     {"func":"valueControlIfElse"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockControlForeverIf","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}],"next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]},{"type":"string","value":"5"}]}],"containers":[{"func":"blockMotionTurnCW","values":[{"type":"string","value":"15"}]}]}}}]}} Add to my Backpack


{"func":"blockControlIfElse"}

Si de lo contrario

El bloque de flujo "si de lo contrario" ejecuta el código contenido dentro de "si" si el parámetro es verdadero; y el código contenido en "de lo contrario" si el parámetro es falso (pero no ambos).

Parameters:

Condición: este parámetro es un valor boooleano que determina si se ejecuta el código contenido dentro de "si" o dentro de "de lo contrario".

Related Blocks:
{"func":"blockControlIf"} ,     {"func":"valueControlIfElse"}

Sample Code:
{"func":"registerSpriteCollision","next":{"func":"blockControlIfElse","values":[{"type":"wrapper","func":"valuePhysicsCollidedWithSprite","values":[{"type":"string","value":"Ball"}]}],"containers":[{"func":"blockControlPostMessageAndWait","values":[{"type":"string","value":"Add Point"},{"type":"string","value":"any"},{"type":"wrapper","func":"valueVar","name":"CurrentScore"}]},{"func":"blockControlPostMessage","values":[{"type":"string","value":"Subtract Point"},{"type":"string","value":"stage"},{"type":"wrapper","func":"valueVar","name":"CurrentScore"}]}]}} Add to my Backpack


{"func":"valueControlIfElse"}

Si entonces de lo contrario

"Si entonces de lo contrario" devuelve el segundo parámetro si el primer parámetro es verdadero, y el tercer parámetro si el primer parámetro es falso.

Parameters:

Condición: este parámetro es un valor booleano que determina cuál de los dos siguientes parámetros se devolverá.

Valor de retorno 1: se devolverá este valor si el parámetro condicional es verdadero.

Valor de retorno 2: se devolverá este valor si el parámetro condicional es falso.

Related Blocks:
{"func":"blockControlIf"} ,     {"func":"blockControlIfElse"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueControlIfElse","values":[{"type":"wrapper","func":"valueVar","name":"Playing"},{"type":"string","value":"Pause"},{"type":"string","value":"Play"}]}]}} Add to my Backpack


Loops

{"func":"blockControlForever"}

Forever

"Forever" block repeats the script inside over and over.

Parameters:

None.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionRotationStyle","values":[{"type":"choice","value":"left-right"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionBounceOnEdge","next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}}]}}} Add to my Backpack


{"func":"blockControlRepeat"}

Repeat

"Repeat" block repeats the script inside the specified number of times.

Parameters:

NumRepeats: This parameter indicates how many times to repeat the code inside this block.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionTurnCCW","values":[{"type":"string","value":"15"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".5"}]}}]}} Add to my Backpack


{"func":"blockControlForeverIf"}

Forever If

"Forever If" Flow block acts like a normal forever loop but only continues looping while the parameter is true.

Parameters:

Condition: This parameter should be a boolean value that determines whether or not the forever loop continues running the code inside it.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForever"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockControlForeverIf","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}],"next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]},{"type":"string","value":"5"}]}],"containers":[{"func":"blockMotionTurnCW","values":[{"type":"string","value":"15"}]}]}}}]}} Add to my Backpack


{"func":"blockControlWaitUntil"}

Wait Until

"Wait Until" pauses the given script until the parameter is equivalent to true.

Parameters:

Condition: This parameter should be a boolean value that determines when the block will stop waiting.

Related Blocks:
{"func":"blockControlWait"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"right edge"}]}],"next":{"func":"blockLooksThinkFor","values":[{"type":"string","value":"Turn me around!"},{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"blockControlWhile"}

Repeat While

"Repeat While" performs the code inside it while the parameter is still true.

Parameters:

Condition: This parameter should be a boolean value that determines when the block should stop repeating the code inside it.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlForever"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlWhile","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valueVar","name":"NumLives"},{"type":"string","value":"0"}]}],"containers":[{"func":"blockVarPropSet","values":[{"type":"string","value":"Playing"},{"type":"string","value":"self"},{"type":"string","value":"false"}]}]}]}} Add to my Backpack


{"func":"blockControlRepeatUntil"}

Repeat Until

"Repeat Until" performs the code inside it until the parameter is true

Parameters:

Condition: This parameter should be a boolean value that determines when the block should stop repeating the code inside it.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlForever"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlRepeatUntil","values":[{"type":"wrapper","func":"valueOpNot","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}]}],"containers":[{"func":"blockSoundChangeVolume","values":[{"type":"number","value":"1"}]}]}} Add to my Backpack


{"func":"blockControlFor"}

For

"For" block repeats the script inside the specified number of times and updates the variable specified by the first parameter.

Parameters:

Variable: This parameter indicates the variable to update.

From: This parameter indicates the starting value.

To: This parameter indicates the ending value.

StepBy: This parameter indicates the value to skip by (usually 1).

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlForEach"} ,     {"func":"blockControlBreak"} ,     {"func":"blockControlContinue"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockControlScriptVar","cat":"var","label":"script variables {scriptvar:i}{varargs:valueScriptVar}","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"}],"next":{"func":"blockControlFor","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":"0"},{"type":"number","value":"10"},{"type":"number","value":"1"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"wrapper","func":"valueOpMultiply","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":10}]}],"next":{"func":"blockControlWait","values":[{"type":"number","value":0.5}]}}]}}} Add to my Backpack


{"func":"blockControlForEach"}

For Each

"For Each" block iterates over all the values in the specified variable.

Parameters:

Variable: This is a variable or list containing the list of values to iterate over.

As: This parameter indicates the variable to update.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlFor"} ,     {"func":"blockControlBreaks"} ,     {"func":"blockControlContinue"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockListDel","values":[{"type":"choice","value":"all"},{"type":"string","value":"fruits"}],"next":{"func":"blockListAdd","values":[{"type":"string","value":"apple"},{"type":"string","value":"orange"},{"type":"string","value":"mango"},{"type":"string","value":"peach"},{"type":"string","value":"fruits"}],"next":{"func":"blockControlPrint","values":[{"type":"wrapper","func":"valueList","name":"fruits"}],"next":{"func":"blockControlPrint","values":[{"type":"wrapper","func":"valueListLength","values":[{"type":"string","value":"fruits"}]}],"next":{"func":"blockControlScriptVar","cat":"var","label":"script variables {scriptvar:afruit}{varargs:valueScriptVar}","values":[{"type":"wrapper","func":"valueScriptVar","name":"afruit"}],"next":{"func":"blockControlForEach","values":[{"type":"wrapper","func":"valueList","name":"fruits"},{"type":"string","value":"afruit"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"Fruit: "},{"type":"wrapper","func":"valueScriptVar","name":"afruit"}]},{"type":"number","value":"2"}]}]}}}}}}} Add to my Backpack


{"func":"blockControlBreak"}

Break

"Break" exits out of a loop.

Parameters:

None.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlFor"} ,     {"func":"blockControlForEach"} ,     {"func":"blockControlContinue"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlWhile","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valueVar","name":"NumLives"},{"type":"string","value":"1"}]}],"containers":[{"func":"blockControlBreak"}]}]}} Add to my Backpack


{"func":"blockControlContinue"}

Continue

"Continue" skips the rest of the blocks in the loop and continues the next loop cycle.

Parameters:

None.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlFor"} ,     {"func":"blockControlForEach"} ,     {"func":"blockControlBreak"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlScriptVar","cat":"var","label":"script variables {scriptvar:i}{varargs:valueScriptVar}","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"}],"next":{"func":"blockInlineComment","values":[{"type":"string","value":"Skip all numbers divisible by 3"}],"next":{"func":"blockControlFor","values":[{"type":"string","value":"i"},{"type":"number","value":1},{"type":"number","value":20},{"type":"number","value":"1"}],"containers":[{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valueOpMod","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":3}]},{"type":"string","value":"0"}]}],"containers":[{"func":"blockControlContinue"}],"next":{"func":"blockLooksSayFor","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":"2"}]}}]}}}} Add to my Backpack


{"func":"blockControlForever"}

Por siempre

El bloque "por siempre" repite la secuencia de comandos que contiene una y otra vez.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionRotationStyle","values":[{"type":"choice","value":"left-right"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionBounceOnEdge","next":{"func":"blockControlWait","values":[{"type":"number","value":".1"}]}}}]}}} Add to my Backpack


{"func":"blockControlRepeat"}

Repetir

EL bloque "repetir" repite la secuencia de comandos que contiene el número indicado de veces.

Parameters:

Número de veces: este parámetro indica cuántas veces se repetirá el código contenido dentro de este bloque.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionTurnCCW","values":[{"type":"string","value":"15"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":".5"}]}}]}} Add to my Backpack


{"func":"blockControlForeverIf"}

Por siempre si

El "Por siempre si" funciona como un bucle "por siempre" normal, pero continúa repitiéndose únicamente si el parámetro es verdadero.

Parameters:

Condición: este parámetro es un valor booleano que determina si el bucle "para siempre" continúa ejecutando o no el código que contiene.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForever"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockControlForeverIf","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}],"next":{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valueOpRandom","values":[{"type":"number","value":"1"},{"type":"number","value":"10"}]},{"type":"string","value":"5"}]}],"containers":[{"func":"blockMotionTurnCW","values":[{"type":"string","value":"15"}]}]}}}]}} Add to my Backpack


{"func":"blockControlWaitUntil"}

Esperar hasta que

"Esperar hasta que" pone en espera la secuencia de comandos indicada hasta que el parámetro sea verdadero.

Parameters:

Condición: este parámetro es un valor booleano que determina cuándo el bloque dejará de esperar.

Related Blocks:
{"func":"blockControlWait"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlWaitUntil","values":[{"type":"wrapper","func":"valueSensingTouchingSprite","values":[{"type":"string","value":"right edge"}]}],"next":{"func":"blockLooksThinkFor","values":[{"type":"string","value":"Turn me around!"},{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"blockControlWhile"}

Repetir mientras que sea

"Repetir mientras que sea" ejecuta el código que contiene mientras que el parámetro continúe siendo verdadero.

Parameters:

Condición: el parámetro es un valor booleano que determina si el bloque debe dejar de repetir el código que contiene.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlForever"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlWhile","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valueVar","name":"NumLives"},{"type":"string","value":"0"}]}],"containers":[{"func":"blockVarPropSet","values":[{"type":"string","value":"Playing"},{"type":"string","value":"self"},{"type":"string","value":"false"}]}]}]}} Add to my Backpack


{"func":"blockControlRepeatUntil"}

Repetir hasta que

"Repetir hasta que" ejecuta el código que contiene hasta que el parámetro sea verdadero.

Parameters:

Condición: este parámetro es un valor booleano que determina si el bloque debe dejar de repetir el código que contiene.

Related Blocks:
{"func":"blockControlRepeat"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlForever"} ,     {"func":"blockControlWhile"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlRepeatUntil","values":[{"type":"wrapper","func":"valueOpNot","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}]}],"containers":[{"func":"blockSoundChangeVolume","values":[{"type":"number","value":"1"}]}]}} Add to my Backpack


{"func":"blockControlFor"}

Para

El bloque "para" repite la secuencia de comandos que contiene el número especificado de veces, y actualiza la variable especificada en el primer parámetro.

Parameters:

Variable: este parámetro indica la variable que se debe actualizar.

Desde: este parámetro indica el valor inicial.

Hasta: este parámetro indica el valor final.

En incrementos de: este parámetro indica en cuánto debe aumentar el valor cada vez (por lo general en 1).

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlForEach"} ,     {"func":"blockControlBreak"} ,     {"func":"blockControlContinue"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockControlScriptVar","cat":"var","label":"script variables {scriptvar:i}{varargs:valueScriptVar}","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"}],"next":{"func":"blockControlFor","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":"0"},{"type":"number","value":"10"},{"type":"number","value":"1"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"wrapper","func":"valueOpMultiply","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":10}]}],"next":{"func":"blockControlWait","values":[{"type":"number","value":0.5}]}}]}}} Add to my Backpack


{"func":"blockControlForEach"}

Por cada

El bloque "por cada" se aplica repetidamente para todos los valores de la variable especificada.

Parameters:

Variable: una variable o lista que contiene la lista de los valores que deben aplicarse repetidamente.

Como: este parámetro indica la variable a actualizar.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlFor"} ,     {"func":"blockControlBreaks"} ,     {"func":"blockControlContinue"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockListDel","values":[{"type":"choice","value":"all"},{"type":"string","value":"fruits"}],"next":{"func":"blockListAdd","values":[{"type":"string","value":"apple"},{"type":"string","value":"orange"},{"type":"string","value":"mango"},{"type":"string","value":"peach"},{"type":"string","value":"fruits"}],"next":{"func":"blockControlPrint","values":[{"type":"wrapper","func":"valueList","name":"fruits"}],"next":{"func":"blockControlPrint","values":[{"type":"wrapper","func":"valueListLength","values":[{"type":"string","value":"fruits"}]}],"next":{"func":"blockControlScriptVar","cat":"var","label":"script variables {scriptvar:afruit}{varargs:valueScriptVar}","values":[{"type":"wrapper","func":"valueScriptVar","name":"afruit"}],"next":{"func":"blockControlForEach","values":[{"type":"wrapper","func":"valueList","name":"fruits"},{"type":"string","value":"afruit"}],"containers":[{"func":"blockLooksSayFor","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"Fruit: "},{"type":"wrapper","func":"valueScriptVar","name":"afruit"}]},{"type":"number","value":"2"}]}]}}}}}}} Add to my Backpack


{"func":"blockControlBreak"}

Interrumpir

"Interrumpir" sale del bucle.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlFor"} ,     {"func":"blockControlForEach"} ,     {"func":"blockControlContinue"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlWhile","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}],"containers":[{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpLess","values":[{"type":"wrapper","func":"valueVar","name":"NumLives"},{"type":"string","value":"1"}]}],"containers":[{"func":"blockControlBreak"}]}]}} Add to my Backpack


{"func":"blockControlContinue"}

Continuar

"Continuar" se saltea el resto de los bloques en el bucle y continúa con el siguiente ciclo del bucle.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockControlForever"} ,     {"func":"blockControlForeverIf"} ,     {"func":"blockControlWhile"} ,     {"func":"blockControlFor"} ,     {"func":"blockControlForEach"} ,     {"func":"blockControlBreak"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockControlScriptVar","cat":"var","label":"script variables {scriptvar:i}{varargs:valueScriptVar}","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"}],"next":{"func":"blockInlineComment","values":[{"type":"string","value":"Skip all numbers divisible by 3"}],"next":{"func":"blockControlFor","values":[{"type":"string","value":"i"},{"type":"number","value":1},{"type":"number","value":20},{"type":"number","value":"1"}],"containers":[{"func":"blockControlIf","values":[{"type":"wrapper","func":"valueOpEqual","values":[{"type":"wrapper","func":"valueOpMod","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":3}]},{"type":"string","value":"0"}]}],"containers":[{"func":"blockControlContinue"}],"next":{"func":"blockLooksSayFor","values":[{"type":"wrapper","func":"valueScriptVar","name":"i"},{"type":"number","value":"2"}]}}]}}}} Add to my Backpack


Cloning

{"func":"blockControlCloneActor"}

Create Clone of Actor

"Create Clone of Actor" block clones the specified Actor and activates the "Clone Startup" block.

Parameters:

Actor: This parameter indicates which Actor to clone.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"blockControlDeleteActor"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockControlCloneActor","values":[{"type":"string","value":"self"}]}} Add to my Backpack


{"func":"valueControlLastClonedActor"}

Name of Last Cloned Actor

"Name of Last Cloned Actor" block returns the name of the last cloned Actor.

Parameters:

None.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"blockControlDeleteActor"}

Sample Code:
{"func":"registerTrigger","values":[{"type":"wrapper","func":"valueVar","name":"Clone"}],"next":{"func":"blockLooksThink","values":[{"type":"string","value":"I want another"},{"type":"wrapper","func":"valueControlLastClonedActor"},{"type":"string","value":"!"}]}} Add to my Backpack


{"func":"valueControlCloneName"}

Clone Name of Actor

"Clone Name of Actor" block returns the original name of the cloned Actor passed in the parameter. If not a clone, it will return the name of the Actor.

Parameters:

Actor: This parameter indicates the name of the cloned Actor whose original Actor you want the name of.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"blockControlDeleteActor"}


{"func":"valueControlIsClone"}

Is Clone?

"Is Clone?" checks to see if the current Actor is a clone.

Parameters:

None.

Related Blocks:
{"func":"blockControlCloneActor"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"blockControlDeleteActor"}


{"func":"blockControlDeleteActor"}

Delete This Clone

"Delete This Clone" Flow block deletes the cloned Actor that the script above it refers to.

Parameters:

None.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"valueControlCloneName"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockControlWait","values":[{"type":"number","value":"5"}],"next":{"func":"blockControlDeleteActor"}}} Add to my Backpack


{"func":"blockControlCloneActor"}

Crear un clon de

El bloque "crear un clon de" clona al Actor especificado y activa el bloque "comenzar luego del clonado".

Parameters:

Actor: este parámetro indica qué Actor clonar.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"blockControlDeleteActor"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockControlCloneActor","values":[{"type":"string","value":"self"}]}} Add to my Backpack


{"func":"valueControlLastClonedActor"}

Nombre del último actor clonado

El bloque "nombre del último actor clonado" devuelve el nombre del último Actor clonado.

Parameters:

1. Ninguno.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"blockControlDeleteActor"}

Sample Code:
{"func":"registerTrigger","values":[{"type":"wrapper","func":"valueVar","name":"Clone"}],"next":{"func":"blockLooksThink","values":[{"type":"string","value":"I want another"},{"type":"wrapper","func":"valueControlLastClonedActor"},{"type":"string","value":"!"}]}} Add to my Backpack


{"func":"valueControlCloneName"}

Nombre de Actor clonado

El bloque "nombre del Actor clonado" devuelve el nombre el Actor clonado indicado en el parámetro. Si no es un clon, devuelve el nombre del Actor.

Parameters:

1. Actor: este parámetro indica el nombre del Actor clonado del cual quieres saber el nombre del Actor original.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"blockControlDeleteActor"}


{"func":"valueControlIsClone"}

¿Es un clon?

"¿Es un clon?" comprueba si el actor actual es o no un clon.

Parameters:

1. Ninguno.

Related Blocks:
{"func":"blockControlCloneActor"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"blockControlDeleteActor"}


{"func":"blockControlDeleteActor"}

Borrar este clon

El bloque de flujo "borrar este clon" elimina al actor clonado referenciado en la secuencia de comandos anterior al bloque.

Parameters:

1. Ninguno.

Related Blocks:
{"func":"registerCloned"} ,     {"func":"valueControlLastClonedActor"} ,     {"func":"valueControlCloneName"}

Sample Code:
{"func":"registerCloned","next":{"func":"blockControlWait","values":[{"type":"number","value":"5"}],"next":{"func":"blockControlDeleteActor"}}} Add to my Backpack


Delay

{"func":"blockControlWait"}

Wait

"Wait" block waits for the specified number of seconds before continuing the script.

Related Blocks:
{"func":"blockControlWaitUntil"} ,     {"func":"blockMotionMove"} ,     {"func":"blockLooksSay"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionRotationStyle","values":[{"type":"choice","value":"left-right"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionBounceOnEdge","next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]}}} Add to my Backpack


{"func":"blockControlWait"}

Esperar

El bloque "esperar" espera el número indicado de segundos antes de continuar con la secuencia de comandos.

Parameters:

Tiempo: en segundos.

Related Blocks:
{"func":"blockControlWaitUntil"} ,     {"func":"blockMotionMove"} ,     {"func":"blockLooksSay"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionRotationStyle","values":[{"type":"choice","value":"left-right"}],"next":{"func":"blockControlForever","containers":[{"func":"blockMotionMove","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionBounceOnEdge","next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]}}} Add to my Backpack


Debugging

{"func":"blockControlDebugBreak"}

Breakpoint

"Breakpoint" block will cause the program to temporarily pause at the location to allow debugging. Breakpoints can be added in the problem areas of the program to inspect the variables and conditions while testing.

Related Blocks:
{"func":"blockControlDebugBreakOn"}

Sample Code:
{"func":"blockSensingAskChoices","values":[{"type":"string","value":"Yes or no"},{"type":"string","value":"ok"}],"next":{"func":"blockControlDebugBreak"}} Add to my Backpack


{"func":"blockControlDebugBreakOn"}

Breakpoint when Condition

"Breakpoint when Condition" block waits for a condition to occur before temporarily pausing the program for debugging. Breakpoints can be added in the problem areas of the program to inspect the variables and conditions while testing.

Related Blocks:
{"func":"blockControlDebugBreak"}

Sample Code:
{"func":"blockControlDebugBreakOn","values":[{"type":"wrapper","func":"valueOpBinary","values":[{"type":"wrapper","func":"valueMotionXPosition"},{"type":"choice","value":">"},{"type":"string","value":"0"}]}]} Add to my Backpack


{"func":"blockControlDebugBreak"}

Interrumpir

El bloque "interrumpir" hace que el programa se detenga temporalmente en ese punto para permitir su depuración. Se pueden insertar puntos de interrupción en las áreas problemáticas del programa para inspeccionar las variables y condiciones mientras se lo está probando.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockControlDebugBreakOn"}

Sample Code:
{"func":"blockSensingAskChoices","values":[{"type":"string","value":"Yes or no"},{"type":"string","value":"ok"}],"next":{"func":"blockControlDebugBreak"}} Add to my Backpack


{"func":"blockControlDebugBreakOn"}

Interrumpir si condición

El bloque "interrumpir si condición" espera a que se produzca una condición antes de detener temporalmente el programa para su depuración. Se pueden insertar puntos de interrupción en las áreas problemáticas del programa para inspeccionar las variables y condiciones mientras se lo está probando.

Parameters:

Condición: este parámetro es un valor booleano que determina si debe producirse o no la interrupción.

Related Blocks:
{"func":"blockControlDebugBreak"}

Sample Code:
{"func":"blockControlDebugBreakOn","values":[{"type":"wrapper","func":"valueOpBinary","values":[{"type":"wrapper","func":"valueMotionXPosition"},{"type":"choice","value":">"},{"type":"string","value":"0"}]}]} Add to my Backpack


Advanced

{"func":"blockControlStop"}

Stop

"Stop" stops whatever scripts are specified by the parameter (all the scripts, this block, or the Actor’s scripts).

Parameters:

Script to stop: This parameter indicates which scripts you want to stop. You may select "all," "this script," or "other scripts in Actor."

Sample Code:
{"func":"registerTrigger","values":[{"type":"wrapper","func":"valueOpNot","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}]}],"next":{"func":"blockControlStop","values":[{"type":"choice","value":"all"}]}} Add to my Backpack


{"func":"blockControlStop"}

Detener

"Detener" detiene todas las secuencias de comando indicadas en el parámetro (todas las secuencias, este bloque o las secuencias del Actor).

Parameters:

Secuencia a detener: este parámetro indica qué secuencias de comandos deseas detener. Puedes seleccionar "todo", "esta secuencia" u "otras secuencias del Actor".

Sample Code:
{"func":"registerTrigger","values":[{"type":"wrapper","func":"valueOpNot","values":[{"type":"wrapper","func":"valueVar","name":"Playing"}]}],"next":{"func":"blockControlStop","values":[{"type":"choice","value":"all"}]}} Add to my Backpack