coblocks cheat sheet pro - cospaces

32
CoBlocks cheat sheet Last updated: May 2021 All CoBlocks simply described and represented

Upload: others

Post on 20-Feb-2022

20 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CoBlocks cheat sheet PRO - CoSpaces

CoBlockscheat sheet

Last updated: May 2021

All CoBlocks simplydescribed andrepresented

Page 2: CoBlocks cheat sheet PRO - CoSpaces

Table of contentsTransform 3

Transitions 3

Position 5

Rotation 5

Scale 6

Actions 7

Generic 7

Sound 9

Video 9

Events 11

Input 11

Collision 11

Web 12

Other 12

Control 13

Loops 13

If 14

Other 14

Operators 16

Logic 16

Math 16

Items 18

Modify 18

Get 19

Data 21

Variables 21

Values 21

Simple 24

1

Page 3: CoBlocks cheat sheet PRO - CoSpaces

Advanced 25

Properties 25

Functions 27

Simple 27

MERGE Cube 28

Actions 28

Events 28

Simple 29

Notes 30

Samples 30

2

Page 4: CoBlocks cheat sheet PRO - CoSpaces

Transform

Transitions

Make an object move acertain distance in a certaindirection over time

Make an object or acharacter turn over time

Stop an object or acharacter

Make an object move to acertain point over time

3

Page 5: CoBlocks cheat sheet PRO - CoSpaces

Make an object move on apath over time

Make an object turn of acertain angle over time

Make an object turn aroundan axis over time

Make an object turn relativeto a point in a certaindirection

Change the size of anobject over time

4

Page 6: CoBlocks cheat sheet PRO - CoSpaces

Position

Change the positionof an object

Get the positionof an object

Get the distancebetween 2 objects

Rotation

Change the directionof an object

Make an object turntowards another object

5

Page 7: CoBlocks cheat sheet PRO - CoSpaces

Make an objectturn towards certainposition

Get the directionof an object

Scale

Set the size of an object

Get the size of an object

6

Page 8: CoBlocks cheat sheet PRO - CoSpaces

Actions

Generic

Make a charactersay or think something

Change the color of an item

Change the opacityof an item

Show an info panel with atitle, text (and an image)

7

Page 9: CoBlocks cheat sheet PRO - CoSpaces

Show a quiz panel with aquestion and answers thatcan be clicked and willtrigger an action when theselected answer is corrector incorrect.

Show a choice panel with aquestion and options thatcan be clicked and thattrigger different actions.

Play the animationof an object

Make an object saysomething for a certainduration

Make an object thinksomething for a certainduration

8

Page 10: CoBlocks cheat sheet PRO - CoSpaces

Define the text of atext object

Switch to a differentcamera in your scene

Sound

Play a sound file

Stop playing the sound file

Video

Start playing a video andchoose to wait for the videoto end or not before nextactions

9

Page 11: CoBlocks cheat sheet PRO - CoSpaces

Stop playing a certain video

Pause a certain video

10

Page 12: CoBlocks cheat sheet PRO - CoSpaces

Events

Input

Make something happenwhen an item is clicked

Define what happens whena certain object is hoveredand not hovered

Define what happens whena certain key is pressed

Collision

Define what happens whena certain object collideswith another object and nolonger collides with it

11

Page 13: CoBlocks cheat sheet PRO - CoSpaces

Define what happens whena certain object collideswith any other object andno longer collides with it

Web

Show a YouTube video whenthe object is clicked.

Not supported in VR mode

Open a website when theobject is clicked

Not supported in VR mode

Other

Removes existing events onan object (e.g. when thisobject is clicked or hovered)

12

Page 14: CoBlocks cheat sheet PRO - CoSpaces

Control

Loops

Make one or more actionsrepeat a certain amountof times

Make an action happenforever as a loop

Make an action repeat as aloop for a certain amount oftimes. Use every repetitionstep as a variable.

Make an action repeat as aloop while a condition istrue

Make an action repeat foreach entry in a list

13

Page 15: CoBlocks cheat sheet PRO - CoSpaces

Stop a loop from repeating

If

Make an action happen only if a certaincondition is true

Make an action happen only if a certaincondition is true. Else, make anotheraction happen

Other

Make my program wait forsome time

Start the scene again fromthe beginning

14

Page 16: CoBlocks cheat sheet PRO - CoSpaces

Performmultiple actionstogether at thesame time

Example: Code A and B will start at thesame time. When they both finish, code Cwill start.

Start severalaction sequencesseparately and atthe same time

Example: Code A and B will start at thesame time separately from each other.

This CoBlock structure makes sensewhen code B consists of severalCoBlocks.

This is similar to the “run parallel”example above if code C was empty.

Switch to a different scene

Quit the CoSpace andoptionally show an image

Hide or show arrows toswitch scenes

15

Page 17: CoBlocks cheat sheet PRO - CoSpaces

Operators

Logic

Enter an arithmetic condition

Enter a logical condition

Check if something isn’t true

Check if something is true and return acertain value if it is or isn’t

Math

Enter an arithmetic condition

Get a random integer number within acertain range

16

Page 18: CoBlocks cheat sheet PRO - CoSpaces

Get a random number within a certain range

Limit a number within a certain range ofnumbers

Check if a certain number is even or odd.Returns true for even, false for odd.

Check if a certain number is divisible byanother number. Returns true if it is.

Get the remainder of a division

Get the rounded value of a certain number

Gets the rounded to n decimals value of acertain number

Get the square root of a certain number

Get the result of a trigonometric operation

Get the sum of a list of variables

17

Page 19: CoBlocks cheat sheet PRO - CoSpaces

Items

Modify

Add the child of an object toanother object

Attach an object to another object

Detach an object from the objectit’s attached to

Delete an object

Delete all children of an object

Activate physics on an object

Disable physics on an object

Add an object at a certain positionand with a certain name

18

Page 20: CoBlocks cheat sheet PRO - CoSpaces

Change the name of an object

Get

Get a certain item

Get a certain group item

Get a certain camera object

Get a certain path object

Get a certain text object

Get a certain 3D text object

Get a certain video

Get a certain object with physics

19

Page 21: CoBlocks cheat sheet PRO - CoSpaces

Get an object of a certain name

Get the name of a certain object

Duplicate a certain object

Get the parent of a certain object

Get the number of children of acertain object

Get a certain object’s child

Create an object at a certainposition and with a certain name

Check whether a certain video isplaying

20

Page 22: CoBlocks cheat sheet PRO - CoSpaces

Data

Variables

Create a variable with a certaininitial value

Store a certain CoSpace variableunder a certain name in order toreuse it in another scene

Get the stored CoSpace value

Increase or decrease the value of avariable

Use a certain variable

Values

Use false or true

21

Page 23: CoBlocks cheat sheet PRO - CoSpaces

Use a certain number

Use a certain mathematicalconstant

Use no value

Use a random color

Get the color of a certain object

Use a certain color you pick

Use a certain color you definewith its RGB values

Mix 2 colors together at a certainratio

Use a text that you define

Create a text string with certaintexts that you define

22

Page 24: CoBlocks cheat sheet PRO - CoSpaces

Use certain coordinates

Use a certain coordinate

Use the length of a certain variable

23

Page 25: CoBlocks cheat sheet PRO - CoSpaces

Physics

Simple

Push a certain object in acertain direction at acertain speed

Push an object towardsanother object at a certainspeed

Push an object towards acertain position at a certainspeed

Push an object in a certaindirection at a certain speed

Make a certain object spinin a certain direction at acertain speed

24

Page 26: CoBlocks cheat sheet PRO - CoSpaces

Define a duration forphysics CoBlocks to getexecuted

Advanced

Set the local or global speed for acertain physics object

Set the local or global angularspeed for a certain physics object

Properties

Restrict the movement of anobject on axes

Define whether an object is staticor not

25

Page 27: CoBlocks cheat sheet PRO - CoSpaces

Define whether an object cancollide with other objects

Define the friction level of acertain object

Define the weight (mass) of acertain object

Define the bounciness level of acertain object

Define the gravity level in yourscene

Change the speed at whichphysics happen (1 = standardspeed)

26

Page 28: CoBlocks cheat sheet PRO - CoSpaces

Functions

Simple

Stop a function from executingfurther

Return a certain value from afunction

27

Page 29: CoBlocks cheat sheet PRO - CoSpaces

MERGE Cube

Actions

Place a certain object on a certainside of the MERGE Cube

Change the opacity level of theMERGE Cube

Make the inside of the MERGECube visible or invisible

Events

Make an action happen when theMERGE Cube is clicked anddefine whether it should happenonly once or more

28

Page 30: CoBlocks cheat sheet PRO - CoSpaces

Make an action happen when theMERGE Cube is hovered anddefine whether it should happenonly once or every time it ishovered

Make an action happen whenlooking at a certain side of theMERGE Cube and define whetherit should happen only once orevery time it is looked

Make an action happen when theMERGE Cube is turned a certainway and define whether it shouldhappen only once or every timethe MERGE Cube is turned

Stop a group of MERGE Cubeactions from happening

Simple

Use a certain side of the MERGE Cube

Use the visible side of the MERGE Cube (the onethe camera is currently looking at)

29

Page 31: CoBlocks cheat sheet PRO - CoSpaces

Notes

Samples

In this case the girl will turn and move at thesame time. And when both moves are done, thegirl will play clap animation and the flow willcontinue.

In this case, the girl will start moving and alsoturning at the same time. After movement thegirl will also clap, but the turn and main flowof the code will start not waiting formovement to be done.

30

Page 32: CoBlocks cheat sheet PRO - CoSpaces

Code A and Code B will start at the same time.When they both finish, Code C will start.

Code A and code B will start at the same timeseparately from each other. This CoBlockstructure makes sense when “Code B” consistsof many CoBlocks. It is similar to previous codeif the Code C is empty

31