Motion Blocks

Movement

{"func":"blockMotionMove"}

Move

"Move" moves an Actor by the specified number of pixels.

Parameters:

Number of Pixels: This parameter indicates how many pixels the Actor will move.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionGlide"} ,     {"func":"blockMotionSetX"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionPointTowards","values":[{"type":"string","value":"right edge"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"blockMotionGoTo"}

Go To

"Go To" moves an Actor to the given X and Y coordinates on the Stage.

Parameters:

X: This parameter indicates the X coordinate on the Stage that the Actor should move to.

Y: This parameter indicates the Y coordinate on the Stage that the Actor should move to.

Related Blocks:
{"func":"blockMotionGoTowards"} ,     {"func":"blockMotionMove"}

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


{"func":"blockMotionGoTowards"}

Go To Actor

"Go To Actor" sets the position of an Actor to the position of the parameter.

Parameters:

Actor: Your Actor will move to the the position of this Actor.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionMove"}

Sample Code:
{"func":"blockControlForever","containers":[{"func":"blockMotionGoTowards","values":[{"type":"string","value":"mouse-pointer"}]}]} Add to my Backpack


{"func":"blockMotionGlide"}

Glide

"Glide" points and moves an Actor towards the specified X and Y coordinates over the duration of time specified by the first parameter.

Parameters:

Seconds: This parameter is the number of seconds that the glide will last.

X: This parameter is the destination X coordinate.

Y: This parameter is the destination Y coordinate.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionMove"} ,     {"func":"blockMotionGoTowards"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockMotionGlide","values":[{"type":"number","value":"5"},{"type":"number","value":"0"},{"type":"number","value":"100"}]}} Add to my Backpack


{"func":"blockMotionBounceOnEdge"}

If On Edge, Bounce

"If On Edge, Bounce" tells an Actor to bounce if it reaches the end of the screen.

Parameters:

None.

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

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":"blockMotionMove"}

Mover

"Mover" desplaza a un Actor el número indicado de píxeles.

Parameters:

Número de píxeles: este parámetro indica cuántos píxeles se desplazará el Actor.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionGlide"} ,     {"func":"blockMotionSetX"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionPointTowards","values":[{"type":"string","value":"right edge"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"blockMotionGoTo"}

Ir a

"Ir a" desplaza a un Actor a las coordenadas X e Y del escenario indicadas.

Parameters:

X: este parámetro indica la coordenada X del escenario adonde se moverá el Actor.

Y: este parámetro indica la coordenada Y del escenario adonde se moverá el Actor.

Related Blocks:
{"func":"blockMotionGoTowards"} ,     {"func":"blockMotionMove"}

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


{"func":"blockMotionGlide"}

Deslizarse

"Deslizarse" apunta y desplaza a un Actor hacia las coordenadas X e Y indicadas, durante el lapso de tiempo indicado en el primer parámetro.

Parameters:

Segundos: este parámetro es el número de segundos de duración del deslizamiento.

X: este parámetro es la coordenada X de destino.

Y: este parámetro es la coordenada Y de destino.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionMove"} ,     {"func":"blockMotionGoTowards"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockMotionGlide","values":[{"type":"number","value":"5"},{"type":"number","value":"0"},{"type":"number","value":"100"}]}} Add to my Backpack


{"func":"blockMotionBounceOnEdge"}

Rebotar si toca un borde

"Rebotar si toca un borde" le indica a un Actor que rebote cuando alcance el borde de la pantalla.

Parameters:

Ninguno.

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

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":"blockMotionGoTowards"}

Ir a Actor

"Ir a Actor" fija la posición de un Actor como la posición del parámetro.

Parameters:

Actor: tu Actor se moverá a la posición de este Actor.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionMove"}

Sample Code:
{"func":"blockControlForever","containers":[{"func":"blockMotionGoTowards","values":[{"type":"string","value":"mouse-pointer"}]}]} Add to my Backpack


{"func":"blockMotionMove"}

Mover

"Mover" desplaza a un Actor el número indicado de píxeles.

Parameters:

Número de píxeles: este parámetro indica cuántos píxeles se desplazará el Actor.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionGlide"} ,     {"func":"blockMotionSetX"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionPointTowards","values":[{"type":"string","value":"right edge"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"blockMotionGoTo"}

Ir a

"Ir a" desplaza a un Actor a las coordenadas X e Y del escenario indicadas.

Parameters:

X: este parámetro indica la coordenada X del escenario adonde se moverá el Actor.

Y: este parámetro indica la coordenada Y del escenario adonde se moverá el Actor.

Related Blocks:
{"func":"blockMotionGoTowards"} ,     {"func":"blockMotionMove"}

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


{"func":"blockMotionGoTowards"}

Ir a Actor

"Ir a Actor" fija la posición de un Actor como la posición del parámetro.

Parameters:

Actor: tu Actor se moverá a la posición de este Actor.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionMove"}

Sample Code:
{"func":"blockControlForever","containers":[{"func":"blockMotionGoTowards","values":[{"type":"string","value":"mouse-pointer"}]}]} Add to my Backpack


{"func":"blockMotionGlide"}

Deslizarse

"Deslizarse" apunta y desplaza a un Actor hacia las coordenadas X e Y indicadas, durante el lapso de tiempo indicado en el primer parámetro.

Parameters:

Segundos: este parámetro es el número de segundos de duración del deslizamiento.

X: este parámetro es la coordenada X de destino.

Y: este parámetro es la coordenada Y de destino.

Related Blocks:
{"func":"blockMotionGoTo"} ,     {"func":"blockMotionMove"} ,     {"func":"blockMotionGoTowards"}

Sample Code:
{"func":"registerSpriteTrigger","next":{"func":"blockMotionGlide","values":[{"type":"number","value":"5"},{"type":"number","value":"0"},{"type":"number","value":"100"}]}} Add to my Backpack


{"func":"blockMotionBounceOnEdge"}

Rebotar si toca un borde

"Rebotar si toca un borde" le indica a un Actor que rebote cuando alcance el borde de la pantalla.

Parameters:

Ninguno.

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

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


Position

{"func":"blockMotionChangeXBy"}

Change X By

"Change X By" increments the X coordinate of an Actor by the specified number of pixels.

Parameters:

Units: Your Actor’s new X coordinate will be its current X coordinate plus this value. You can use a negative value if you want to move left.

Related Blocks:
{"func":"blockMotionSetX"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"20"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]} Add to my Backpack


{"func":"blockMotionSetX"}

Set X To

"Set X To" sets an Actor’s X coordinate to the parameter.

Parameters:

X: Your Actor’s new X coordinate will be this value.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionSetX","values":[{"type":"number","value":"0"}],"next":{"func":"blockMotionSetY","values":[{"type":"number","value":"0"}]}}} Add to my Backpack


{"func":"blockMotionChangeYBy"}

Change Y By

"Change Y By" increments the Y coordinate of an Actor by the specified number of pixels.

Parameters:

Units: Your Actor’s new Y coordinate will be its current Y coordinate plus this value. You can use a negative value if you want to move left.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionSetX"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"20"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]} Add to my Backpack


{"func":"blockMotionSetY"}

Set Y To

"Set Y To" sets an Actor’s Y coordinate to the parameter.

Parameters:

Y: Your Actor’s new Y coordinate will be this value.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetX"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionSetX","values":[{"type":"number","value":"0"}],"next":{"func":"blockMotionSetY","values":[{"type":"number","value":"0"}]}}} Add to my Backpack


{"func":"valueMotionXPosition"}

X Position

"X Position" returns the Actor’s X coordinate.

Parameters:

None.

Related Blocks:
{"func":"valueMotionYPosition"} ,     {"func":"blockMotionGoTo"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"valueMotionYPosition"}

Y Position

"Y Position" returns the Actor’s Y coordinate.

Parameters:

None.

Related Blocks:
{"func":"valueMotionXPosition"} ,     {"func":"blockMotionGoTo"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"blockMotionChangeXBy"}

Cambiar X en

"Cambiar X en" incrementa la coordenada X de un Actor en el número indicado de píxeles.

Parameters:

Unidades: la nueva coordenada del Actor será la coordenada X actual, más este valor. Puedes utilizar un valor negativo si deseas moverte hacia la izquierda.

Related Blocks:
{"func":"blockMotionSetX"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"20"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]} Add to my Backpack


{"func":"blockMotionSetX"}

Establecer X en

"Establecer X en" establece como coordenada X del Actor al valor indicado.

Parameters:

X: la nueva coordenada X de tu Actor será este valor.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionSetX","values":[{"type":"number","value":"0"}],"next":{"func":"blockMotionSetY","values":[{"type":"number","value":"0"}]}}} Add to my Backpack


{"func":"blockMotionChangeYBy"}

Cambiar Y en

"Cambiar Y en" incrementa la coordenada Y de un Actor en el número indicado de píxeles.

Parameters:

Unidades: la nueva coordenada Y del Actor será la coordenada Y actual, más este valor. Puedes utilizar un valor negativo si deseas moverte hacia abajo.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionSetX"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"20"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]} Add to my Backpack


{"func":"blockMotionSetY"}

Establecer Y en

"Establecer Y en" establece como coordenada Y del Actor al valor indicado.

Parameters:

Y: la nueva coordenada Y de tu Actor será este valor.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetX"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionSetX","values":[{"type":"number","value":"0"}],"next":{"func":"blockMotionSetY","values":[{"type":"number","value":"0"}]}}} Add to my Backpack


{"func":"valueMotionXPosition"}

Posición X

"Posición X" devuelve la coordenada X del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"valueMotionYPosition"} ,     {"func":"blockMotionGoTo"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"valueMotionYPosition"}

Posición Y

"Posición Y" devuelve la coordenada Y del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"valueMotionXPosition"} ,     {"func":"blockMotionGoTo"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"blockMotionSetY"}

Establecer Y en

"Establecer Y en" establece como coordenada Y del Actor al valor indicado.

Parameters:

Y: la nueva coordenada Y de tu Actor será este valor.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetX"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionSetX","values":[{"type":"number","value":"0"}],"next":{"func":"blockMotionSetY","values":[{"type":"number","value":"0"}]}}} Add to my Backpack


{"func":"valueMotionXPosition"}

Posición X

"Posición X" devuelve la coordenada X del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"valueMotionYPosition"} ,     {"func":"blockMotionGoTo"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"valueMotionYPosition"}

Posición Y

"Posición Y" devuelve la coordenada Y del Actor.

Parameters:

Ninguno.

Related Blocks:
{"func":"valueMotionXPosition"} ,     {"func":"blockMotionGoTo"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"blockMotionChangeXBy"}

Cambiar X en

"Cambiar X en" incrementa la coordenada X de un Actor en el número indicado de píxeles.

Parameters:

Unidades: la nueva coordenada del Actor será la coordenada X actual, más este valor. Puedes utilizar un valor negativo si deseas moverte hacia la izquierda.

Related Blocks:
{"func":"blockMotionSetX"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"20"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]} Add to my Backpack


{"func":"blockMotionSetX"}

Establecer X en

"Establecer X en" establece como coordenada X del Actor al valor indicado.

Parameters:

X: la nueva coordenada X de tu Actor será este valor.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionChangeYBy"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"registerFlagTrigger","next":{"func":"blockMotionSetX","values":[{"type":"number","value":"0"}],"next":{"func":"blockMotionSetY","values":[{"type":"number","value":"0"}]}}} Add to my Backpack


{"func":"blockMotionChangeYBy"}

Cambiar Y en

"Cambiar Y en" incrementa la coordenada Y de un Actor en el número indicado de píxeles.

Parameters:

Unidades: la nueva coordenada Y del Actor será la coordenada Y actual, más este valor. Puedes utilizar un valor negativo si deseas moverte hacia abajo.

Related Blocks:
{"func":"blockMotionChangeXBy"} ,     {"func":"blockMotionSetX"} ,     {"func":"blockMotionSetY"}

Sample Code:
{"func":"blockControlRepeat","values":[{"type":"number","value":"10"}],"containers":[{"func":"blockMotionChangeXBy","values":[{"type":"number","value":"10"}],"next":{"func":"blockMotionChangeYBy","values":[{"type":"number","value":"20"}],"next":{"func":"blockControlWait","values":[{"type":"number","value":"1"}]}}}]} Add to my Backpack


Rotation

{"func":"blockMotionTurnCW"}

Turn Clockwise

"Turn Clockwise" rotates an Actor the specified number of degrees in the clockwise direction.

Parameters:

Degrees: This parameter indicates the number of degrees the Actor should turn, in the clockwise direction.

Related Blocks:
{"func":"blockMotionTurnCCW"}

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":"blockMotionPointDirection"}

Point in Direction

"Point in Direction" points an Actor in the direction specified by the parameter.

Parameters:

Degrees: This parameter indicates the direction, in degrees, that the Actor should face. 90 degrees is to the right, 0 is upwards, and so on.

Related Blocks:
{"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockInlineComment","values":[{"type":"string","value":"Point left"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":-90}]}} Add to my Backpack


{"func":"blockMotionPointAngle"}

Set Angle

"Set Angle" points an Actor in the direction specified by the parameter.

Parameters:

Degrees: This parameter indicates the angle, in degrees, that the Actor should face. 0 degrees is to the right, 90 is upwards, and so on.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockInlineComment","values":[{"type":"string","value":"Point left"}],"next":{"func":"blockMotionPointAngle","values":[{"type":"string","value":180}]}} Add to my Backpack


{"func":"blockMotionPointTowards"}

Point Towards

"Point Towards" points an Actor towards the parameter (e.g. mouse-pointer or another Actor).

Parameters:

Space: This parameter indicates where the Actor should point towards. Some options are "mouse-pointer," "left edge," and "top edge."

Related Blocks:
{"func":"blockMotionPointDirection"}

Sample Code:
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionPointTowards","values":[{"type":"string","value":"right edge"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"blockMotionRotationStyle"}

Set Rotation Style

"Set Rotation Style" sets how an Actor behaves when it rotates.

Parameters:

Rotation Style: This parameter will be the Actor’s new rotation style. ‘All around’ makes it follow the rotation angle (e.g. flip upside down when it bounces off a wall), ‘left-right’ only lets it point left or right, and ‘don’t rotate’ makes it always point towards its default direction.

Related Blocks:
{"func":"blockMotionBounceOnEdge"}

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":"blockMotionTurnCCW"}

Turn Counter-Clockwise

"Turn Counter-Clockwise" rotates an Actor the specified number of degrees in the counter-clockwise direction.

Parameters:

Degrees: This parameter indicates the number of degrees the Actor should turn, in the counter-clockwise direction.

Related Blocks:
{"func":"blockMotionTurnCW"}

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":"valueMotionDirection"}

Direction

"Direction" returns the Actor’s direction, in degrees.

Parameters:

None.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"valueMotionAngle"}

Ángulo

"Ángulo" devuelve el ángulo matemático del Actor, en grados.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointAngle"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Angle:"},{"type":"wrapper","func":"valueMotionAngle"}]}]} Add to my Backpack


{"func":"valueMotionAngle"}

Angle

"Angle" returns the Actor’s mathematical angle, in degrees.

Parameters:

None.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointAngle"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Angle:"},{"type":"wrapper","func":"valueMotionAngle"}]}]} Add to my Backpack


{"func":"blockMotionRotationStyle"}

Establecer estilo de rotación

"Establecer estilo de rotación" determina cómo se comporta un Actor al rotar.

Parameters:

Estilo de rotación: este parámetro será el nuevo estilo de rotación del Actor. "Media vuelta" hace que siga el ángulo de rotación (por ejemplo, voltear boca abajo cuando rebota en una pared), "izquierda - derecha" sólo permite que apunte a izquierda o derecha, y "no rotar" hace que siempre apunte en la dirección por defecto.

Related Blocks:
{"func":"blockMotionBounceOnEdge"}

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":"blockMotionTurnCW"}

Girar en sentido horario

"Girar en sentido horario" hace que el Actor rote el número indicado de grados en sentido horario.

Parameters:

Grados: este parámetro indica el número de grados que el Actor debe girar, en sentido de las agujas del reloj.

Related Blocks:
{"func":"blockMotionTurnCCW"}

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":"blockMotionTurnCCW"}

Girar en sentido antihorario

"Girar en sentido antihorario" hace que el Actor rote el número indicado de grados en sentido antihorario.

Parameters:

Grados: este parámetro indica el número de grados que el Actor debe girar, en sentido contrario al de las agujas del reloj.

Related Blocks:
{"func":"blockMotionTurnCW"}

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":"blockMotionPointDirection"}

Apuntar en dirección

"Apuntar en dirección" hace que un Actor apunte en la dirección indicada por el parámetro.

Parameters:

Grados: este parámetro indica la dirección, en grados, hacia la que el Actor apunta. 90 grados es a la derecha, 0 es hacia arriba, etc.

Related Blocks:
{"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockInlineComment","values":[{"type":"string","value":"Point left"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":-90}]}} Add to my Backpack


{"func":"blockMotionPointAngle"}

Establecer ángulo en

"Establecer ángulo" apunta a un Actor en la dirección especificada en el parámetro.

Parameters:

Grados: este parámetro indica el ángulo, en grados, hacia la que el Actor apunta. 0 grados es a la derecha, 90 es hacia arriba, etc.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockInlineComment","values":[{"type":"string","value":"Point left"}],"next":{"func":"blockMotionPointAngle","values":[{"type":"string","value":180}]}} Add to my Backpack


{"func":"blockMotionPointTowards"}

Apuntar a

"Apuntar a" hace que el un Actor apunte hacia el parámetro (por ejemplo, ubicación presionada u otro Actor).

Parameters:

Espacio: este parámetro indica hacia dónde debe apuntar el Actor. Algunas de las opciones son "punto presionado", "borde izquierdo" y "borde superior".

Related Blocks:
{"func":"blockMotionPointDirection"}

Sample Code:
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionPointTowards","values":[{"type":"string","value":"right edge"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"valueMotionDirection"}

Dirección

"Dirección" devuelve la dirección a la que apunta el Actor, en grados.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"blockMotionRotationStyle"}

Establecer estilo de rotación

"Establecer estilo de rotación" determina cómo se comporta un Actor al rotar.

Parameters:

Estilo de rotación: este parámetro será el nuevo estilo de rotación del Actor. "Media vuelta" hace que siga el ángulo de rotación (por ejemplo, voltear boca abajo cuando rebota en una pared), "izquierda - derecha" sólo permite que apunte a izquierda o derecha, y "no rotar" hace que siempre apunte en la dirección por defecto.

Related Blocks:
{"func":"blockMotionBounceOnEdge"}

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":"blockMotionTurnCW"}

Girar en sentido horario

"Girar en sentido horario" hace que el Actor rote el número indicado de grados en sentido horario.

Parameters:

Grados: este parámetro indica el número de grados que el Actor debe girar, en sentido de las agujas del reloj.

Related Blocks:
{"func":"blockMotionTurnCCW"}

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":"blockMotionPointDirection"}

Apuntar en dirección

"Apuntar en dirección" hace que un Actor apunte en la dirección indicada por el parámetro.

Parameters:

Grados: este parámetro indica la dirección, en grados, hacia la que el Actor apunta. 90 grados es a la derecha, 0 es hacia arriba, etc.

Related Blocks:
{"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockInlineComment","values":[{"type":"string","value":"Point left"}],"next":{"func":"blockMotionPointDirection","values":[{"type":"string","value":-90}]}} Add to my Backpack


{"func":"blockMotionPointAngle"}

Establecer ángulo en

"Establecer ángulo" apunta a un Actor en la dirección especificada en el parámetro.

Parameters:

Grados: este parámetro indica el ángulo, en grados, hacia la que el Actor apunta. 0 grados es a la derecha, 90 es hacia arriba, etc.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockInlineComment","values":[{"type":"string","value":"Point left"}],"next":{"func":"blockMotionPointAngle","values":[{"type":"string","value":180}]}} Add to my Backpack


{"func":"valueMotionDirection"}

Dirección

"Dirección" devuelve la dirección a la que apunta el Actor, en grados.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Direction:"},{"type":"wrapper","func":"valueMotionDirection"}]}]} Add to my Backpack


{"func":"blockMotionTurnCCW"}

Girar en sentido antihorario

"Girar en sentido antihorario" hace que el Actor rote el número indicado de grados en sentido antihorario.

Parameters:

Grados: este parámetro indica el número de grados que el Actor debe girar, en sentido contrario al de las agujas del reloj.

Related Blocks:
{"func":"blockMotionTurnCW"}

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":"blockMotionPointTowards"}

Apuntar a

"Apuntar a" hace que el un Actor apunte hacia el parámetro (por ejemplo, ubicación presionada u otro Actor).

Parameters:

Espacio: este parámetro indica hacia dónde debe apuntar el Actor. Algunas de las opciones son "punto presionado", "borde izquierdo" y "borde superior".

Related Blocks:
{"func":"blockMotionPointDirection"}

Sample Code:
{"func":"registerKeyTrigger","values":[{"type":"choice","value":"right arrow"}],"next":{"func":"blockMotionPointTowards","values":[{"type":"string","value":"right edge"}],"next":{"func":"blockMotionMove","values":[{"type":"number","value":"5"}]}}} Add to my Backpack


{"func":"valueMotionAngle"}

Ángulo

"Ángulo" devuelve el ángulo matemático del Actor, en grados.

Parameters:

Ninguno.

Related Blocks:
{"func":"blockMotionPointDirection"} ,     {"func":"blockMotionPointAngle"} ,     {"func":"blockMotionPointTowards"}

Sample Code:
{"func":"blockPenDrawText","values":[{"type":"wrapper","func":"valueOpJoin","values":[{"type":"string","value":"X:"},{"type":"wrapper","func":"valueMotionXPosition"},{"type":"string","value":"Y:"},{"type":"wrapper","func":"valueMotionYPosition"},{"type":"string","value":"Angle:"},{"type":"wrapper","func":"valueMotionAngle"}]}]} Add to my Backpack