Coding Block Explanation
Sprite / Background / Description of the block that can control the robot hardware.
The coding block is used by attaching the operation using the mouse in the desired order as shown below.
(Drag the desired block with your mouse and attach it in order.)
The blocks that can be attached are shaped like protrusions at the top and bottom of the left as shown in the figure below.
Blocks made in the shape of 'ㄷ' are used to repeat blocks contained inside or to create conditions to operate.
Blocks with rounded or hexagonal appearances cannot be used independently and are used to provide data inside other action blocks.
As shown in the figure below, it is categorized according to the purpose, and each category has a structure in which the corresponding blocks are listed on the right.
▶Motion Block
The action block is a block for controlling [Sprite], which is activated only when an Sprite is added.
It consists of blocks that can be moved up, down, left, or right in the execution window.
1.1 Moving
A block that can move as much as the value entered based on the current position and direction of the Sprite.
In the 'Move as much as [ ]' blank, enter the distance to move.
1.2 Rotation
A block that can be rotated by the value entered based on the direction of the current Sprite.
Enter the value of the angle to rotate in the blank of 'Rotating [ ] in the direction of the arrow'.
(When you enter a negative number, it rotates in the opposite direction.)
1.3 Relocate
A block that can move the Sprite to a specified location.
It consists of four types as follows.
A block that lets you move the Sprite to [random location / mouse pointer location / other Sprite location] in the execution window.
Click on the white triangle ▼ to specify the elements you want to move.
A block that can move the Sprite by specifying the X and Y coordinates of the execution window.
In the 'x: [ ] y: Go to [ ]' blank, enter the value of the coordinate you want.
Block that allows you to move the Sprite to [random location/mouse pointer location / other Sprite location] in the execution window for a specified time.
Click on the white triangle ▼ to specify the elements you want to move.
In the blank, enter the total time required to travel to the specified location.
A block that can move the Sprite by specifying the X and Y coordinates of the execution window for a specified time.
In the box, enter the time required to move to x: [ ] y: [ ] for [ ] seconds.
Enter the value of the desired coordinates in the 'Go to x: [ ] y: [ ] for [ ] seconds' blank.
1.4 Looking
Blocks that can be specified so that the Sprite can look at a specific location.
It consists of two types.
Blocks that allow the Sprite to specify the direction to view.
In the blanks for View [] degrees, enter the direction the Sprite wants to view. (0-360)
Blocks that allow Sprite to specify objects to view.
Click the white triangle ▼ to specify the desired object (mouse pointer, other Sprite, etc.).
1.5 Deciding&changing coordinates
A coordinate change block is a block that allows the Sprite to move as many values as it wants based on its current position.
It consists of two types.
A coordinate change block is a block that allows the Sprite to enter a value to move to the specified coordinates.
In the blank of "Replace (x or y) coordinates by [ ]", enter the value to move.
(When you enter a negative number, it moves in the direction of the coordinates.)
The coordinate setting block is a block where you can directly input the coordinate value you want to place the Sprite.
It consists of two types.
The block where you can enter the coordinate values where the Sprite will be located.
Enter the values of the X or Y coordinates in the blanks of "Set the (x or y) coordinates to [ ]".
1.6 Bounce when it hits the wall
The command reverses the directional properties of the Sprite when the Sprite in motion touches the top/down/left/right wall of the execution window.
1.7 Setting the rotation method
It is a coding block that can predetermine how the Sprite rotates through a command.
Click the white triangle in the block blank 'Set the rotation method to [▼]' to designate it as one of the properties below.
① Left-right: Set the direction of the Sprite to 'Left' or 'Right' only.
Look to the right when looking from 0 to 180 and to the left when looking from 0 to -180.
② Do not rotate: Fixes the direction of the Sprite to its current state.
Using the rotate command, you cannot change the direction you are looking at.
③ Rotating: Sets the Sprite to a state that can be rotated clockwise or counterclockwise.
1.8 Coordinate and Direction Property Blocks
A block that can use the X-coordinate, Y-coordinate, and orientation information of a Sprite as data.
Use to put data inside a block of other commands, rather than a direct operational command.
□ Click the box to display coordinate information or direction information of the current Sprite in the upper left corner of the execution window.
▶Form Block
A form block is a block for controlling [Sprite], which is activated only when an Sprite is added.
A block that changes the external properties of the Sprite.
2.1 talking & thinking
A speaking block is a block where you can say a word or sentence you want through a Sprite.
It consists of two types.
You can write the following in the blank of [Talking for] seconds.
① : Write a word or sentence you want to talk to.
② : Enter the time to continue the conversation.
In the blank of [ ] Speaking, write the words or sentences you want to say through the Sprite.
A thinking block is a block that can now create a thinking balloon in the Sprite, and code it to say what you want inside the thinking balloon.
It consists of two types.
You can write the following in the 'Think for [2] seconds' blank.
① : Write the words or sentences you want to think about.
② : Enter the amount of time you want your thoughts to last.
In the blank of [ ] Think, write the words or sentences you want to think through the Sprite.
2.2 Change shape or background
A shape change block is a block that can be changed by specifying one of several shapes that are currently dependent on the Sprite.
It consists of two types.
You can change the shape by clicking on the white triangle of 'Replace shape to [▼]'.
When you use the 'Replace to Next' block, the shapes that depend on the current Sprite change in the order in which they are listed.
(When the current Sprite has a shape of 2, operating the replacement block to the next shape will change it to shape number 3.)
A background change block is a block that can be changed by specifying one of several shapes that are dependent on the current background.
It consists of two types.
You can change the background image by specifying the background image by clicking on the white triangle of 'Replace Background to [▼].
Using the 'Replace to Next Background' block, the images dependent on the current background are changed in the order listed.
(When the current background has a shape of 2, operating the replacement block to the next background will change it to background number 3.)
2.3 Resize & Decide
A resizing block is a block that allows you to change the size of the current Sprite by the number you enter.
You can change the size of the Sprite by entering as many numbers as you want to change in the box under Change Size by [].
(If you enter a negative number, the size becomes smaller.)
A resizing block is a block that can change the size of the current Sprite to the value entered.
You can change the size ratio of the Sprite directly by entering a number in the box under Set Size to []%.
(If you enter a value of 100, it is specified as the default size for the Sprite.)
2.4 Graphic Effect
A graphic effect block is a block that can change the [color / graphic effect / brightness / transparency] history of the Sprite.
The 'Change Graphical Effects by [ ]' block allows you to select the effects you want to change from the current state and create as many values as you want to change them to the current value.
You can write the following in the block blank 'Change [▼] effect by [①].
Selectable effects: color / fisheye lens / vortex; / pixelation / mosaic / brightness / transparency
① : For the selected effect, enter the numerical value you want to change.
The [ ] graphics effect block can be created by selecting the effect you want to change from the current state and specifying its value.
You can write the following in the block blank '[▼] effect as [①].
Selectable effects: color / fisheye lens / vortex; / pixelation / mosaic / brightness / transparency
① : You can change the value of the selected effect to the value you wrote in the blank.
If you want to delete all the graphic effects that are currently applied to Sprite and want to return them to the original state, use the 'Clear Graphic Effects' block.
2.5 Show & hide
Block used to hide and/or make the Sprite visible from the screen.
Using the View block, you can view the Sprite in the execution window.
The Hide block lets you hide the appearance of the Sprite from the execution window.
2.6 Setting the exposure order
A block that can specify the order of exposure when multiple Sprite have similar coordinate values and appear to overlap with the execution window.
There are two types of blocks as follows, and how to use them is as follows.
The 'Reorder to [▼]' block allows you to specify the order of exposure of the Sprite to the top or bottom.
You can click on the white triangle and order it 'forward' or 'back'.
The '[▼] Send step' block allows you to move the Sprite's exposure order by the desired step forward or backward, relative to its current location.
Click on the white triangle to specify the 'forward' or 'back' item, and specify the direction in which the Sprite will travel.
[ ] Enter a number in the blank to specify how many steps you want to move based on your current location.
2.7 Shape Property Blocks
A block that can use the shape number, background number, and size information of the Sprite as data.
Use to put data inside a block of other commands, rather than a direct operational command.
□ Click the box to display the current Sprite's shape number or background number and size information in the upper left corner of the execution window.
▶Sound Block
A sound block is a block that can play sound source with a speaker connected to a PC.
3.1 Play & Off
The play block is a block that can output the sound source built into the Rogic program through the speaker.
There are two types of playback blocks.
The '[▼] Play to the end' block operates the selected sound source file to the end.
(You can click on the white triangle to select the sound source that belongs to the Sprite, or you can record it yourself.)
While the sound source is playing, the operation of another block connected under that block cannot be performed.
The '[▼]Play' block is a block that sends a command to play the selected sound source file.
(You can click on the white triangle to select the sound source that belongs to the Sprite, or you can record it yourself.)
You can command only the sound source playback and immediately execute the operation of another block connected under that block.
A sound-off block is a block that stops the sound source being played.
3.2 Determining Sound Effects & Clearing Effectsc
The sound effect determination block is a block that can change the sound source's [tone height / sound position] item.
The 'Change [▼] effect by [ ]' block allows you to select the effect you want to change from the current state of the sound source and create as many values as you want to change.
You can write the following in the block blank 'Change [▼] effect by [①].
Selectable effect: pitch/sound position
① : For the selected effect, enter the numerical value you want to change.
The [▼] effect as [ ] block can be created by selecting the effect you want to change from the current state and specifying its value.
You can write the following in the block blank '[▼] effect as [①].
Selectable effect: pitch/sound position
① : You can change the value of the selected effect to the value you wrote in the blank.
If you want to delete all the effects that have been applied to the current sound source and want to return it to the original state, use the 'Clear Sound Effects' block.
3.3 Changing the Volume
There are two types of blocks that can change the volume of a sound source as follows.
The 'Change Volume by []' block is a block that changes the currently set volume by the value entered in the blank.
The 'Set volume to []%' block is a block that can be specified by entering a volume value in the blank.
The volume of the current sound source can be checked using the 'Volume Properties' block.
□ Click the box to display the volume information of the current sound source in the upper left corner of the execution window.
▶Event Block
Block that allows you to specify when the Sprite starts operating.
This is the first block you use when writing code that makes Sprite work.
4.1 Operation start condition
A block that allows you to specify when you want Sprite to operate.
After specifying when certain conditions are satisfied as shown below, connect various coding blocks to operate when the conditions are satisfied.
"When you click [flag]" block
When you mouse-click the green flag icon in the lower right corner of the execution window, the block attached below that block works.
'[▼] Press key' block
When a particular button on the keyboard is pressed, the block attached below the corresponding block is activated.
By clicking on the white triangle, you can select the key that exists on the keyboard.
Keys to select: arrow key, space key, alphabet key, numeric key, any key
'When I click on stage' / 'When I click on this Sprite' block
If you click on each stage or click on the Sprite where the code is located, the block attached below the corresponding block will operate.
"When the background changes to [▼]" block
When the properties of the background change to the same name as the selection box, the block attached below that block works.
Block 'when [▼] is >'
When the volume of the sound source in the project or the value of the timer is greater than the value entered in the blank, the block attached below the corresponding block operates.
4.2 Message
It is a block that allows organic action between sprites using a separate 'message' specified by the user within the project.
Click to create and use a message with a new name.
Type a new message name as shown above and press the OK button to generate the message with the type name.
Block 'When you receive a [generated message] signal'
You can select a user-generated message from the [▼] list box and then code it so that the block at the bottom of the block works when a signal with the selected message name is sent.
'Send a [generated message] signal' block
You can select a user-generated message from the [▼] list box and send a signal with the message name of the selected message.
The signals sent can be shared by any Sprite and background within the project.
'Send and wait [generated message]' block
Select a user-generated message from the [▼] list box and send a signal for the message name you selected.
After sending the signal, the block at the bottom of the block operates after performing all the command actions connected to the block 'when the [generated message] signal is received'.
▶Control block
It is a coding block that can be controlled so that the code can operate under certain conditions by maintaining the operation state of the Sprite and background, or by entering conditions.
5.1 Wait
After waiting for the amount of time you enter in the blank, the block connected to the bottom of the block is activated.
Only positive numbers can be entered.
5.2 Repeat
It is a block that can repeat the instruction block contained inside the c'-shaped block as many times as desired.
As many times as you type in the blank, the block encased inside the corresponding block repeats.
After completing the repetition operation, the block connected to the bottom of the corresponding block operates.
The block encased inside that block works indefinitely.
Until the specified conditions inside the block are satisfied, the block encased inside the block is repeated.
While the specified conditions inside the block are satisfied, the block encased inside the block is repeated.
5.3 Making Conditions
A block that can specify a specific condition and operate a command block contained inside a 'c'-shaped block when the specified condition is satisfied.
If the specified conditions inside the block are satisfied, the block encased inside the block will operate.
If the block internal designation conditions are satisfied, the block encased in the area ① works.
If the specified conditions inside the block are not satisfied, the block encased in the area ② will operate.
If the specified conditions inside the block are satisfied, the block connected to the bottom of the block is operated.
5.4 Stop
A block that can stop Sprite of a working project.
No other coding block can be connected to the bottom of that block.
In the [▼] list box, you can specify the script that you want to stop working, or you can choose to stop all projects.
Selectable list
[All] : Stop the operation of the entire project.
[This Script]—Only the script to which the block is connected stops working.
Other Scripts in this Sprite: Stops the operation of all scripts except those to which the corresponding block in the Sprite is connected.
5.5 Duplicate
A block that can be controlled by replicating Sprite.
Replicated items are not a concept of Sprite, and are deleted collectively when the project operation ends.