0% found this document useful (0 votes)
2 views

Python Cheat Sheet PRO

The document outlines various programming actions and functions related to object manipulation, physics, and event handling in a coding environment. It includes sections on transformations, actions, events, controls, operators, items, and data management. Additionally, it provides specific commands for moving, rotating, scaling objects, handling collisions, and managing audio and video playback.

Uploaded by

2ppikova
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Python Cheat Sheet PRO

The document outlines various programming actions and functions related to object manipulation, physics, and event handling in a coding environment. It includes sections on transformations, actions, events, controls, operators, items, and data management. Additionally, it provides specific commands for moving, rotating, scaling objects, handling collisions, and managing audio and video playback.

Uploaded by

2ppikova
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Transform 3

Transitions 3

Position 5

Rotation 5

Scale 6

Actions 7
Generic 7

Sound 10
Video 11

Events 12
Input 12

Collision 12

Web 13
Other 13

Control 14
Loops 14

If 15

Other 16

Operators 17
Logic 17

Math 18

Items 20
Modify 20

Get 21

Data 23
Variables 23
Values 24

1
Physics
Simple 26
Advanced 27

Properties 27

Functions 29
Simple 29

2
Make an object move a
certain distance in a certain
degrees on the z-axis in 1
second.direction over time

Make an object or a
character turn over time

Stop an object or a
character

Make an object move to a


certain point over time

3
Make an object move on a
path over time

Make an object turn of a


certain angle

Make an object turn


around an axis

Make an object turn relative


to a point in a certain
direction

Change the size of an


object over time

4
Change the position
of an object

Get the position


of an object

Get the distance


between 2 objects

Change the direction


of an object

Make an object turn

5
Make an object
turn towards certain
position

Get the direction


of an object

Set the size of an object

Get the size of an object

6
Make a character

Change the color


of an item

Change the opacity


of an item

Show an info panel


with a
title, text (and an
image)

7
Show a quiz panel with a
question and answers that
can be clicked and will trigger
an action when the selected
answer is correct
or incorrect.

Show a choice panel with a


question and options that can
be clicked and that
trigger different actions.

8
Play or stop the
animation
of an object

Make an object say


something for a certain
duration

Make an object think


something for a certain
duration

9
Define the text of a
text object

Switch to a different
camera in your scene

Stop playing the sound file

10
Start playing a video and
choose to wait for the video
to end or not before next
actions

Stop playing a certain video

Pause a certain video

11
Make something happen
when an item is clicked

Define what happens


when a certain object is
hovered over

Define what happens


when a certain key is
pressed

Collision

Define what happens when


a certain object collides
with another object

12
Define what happens when
a certain object collides
with any other object and
no longer collides with it

Show a YouTube video


when the object is
clicked.

Currently not supported in Python

Open a website when the


object is clicked

Currently not supported in Python

13
Removes existing events on
an object (e.g. when this
object is clicked or
hovered)

14
Make one or more actions
repeat a certain amount
of times
Repeats the action X times

Make an action happen

Make an action repeat as a


loop for a certain amount of
times. Use every repetition
step as a variable.

Make an action repeat as a


loop while a condition is
true

Stop a loop from


repeating

15
Make an action
repeat for
each entry in a
list

Make an action happen only if a certain


condition is true

Make an action happen only if a certain


condition is true. Else, make another
action happen

16
Make my program wait for
some time

Go to specific scene

Switch to a different scene

Quit the CoSpace and


optionally show an image

Hide or show arrows to


switch scenes

17
Enter an arithmetic condition

Enter a logical condition

Check if something isn’t true

Check if something is true and return a

18
Get a random number
within a certain range

Get a random integer number


within a certain range

Enter an arithmetic condition

Limit a number within a certain


range of numbers

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

Check if a certain number is divisible by


another number. Returns true if it is.

Get the remainder of a division

Get the rounded value of a certain number

Gets the rounded to 2 decimals value of a


certain number

Get the square root of a certain number

Get the result of a trigonometric operation

Get the sum of a list of variables


20
Add the child of an object to
another object

Attach an object to another object

Detach an object from the object


it’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 position


and with a certain name

21
Change the name of an object

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

22
Get an object of a certain name
Currently not supported in Python

Get the name of a certain object

Duplicate a certain object

Get the parent of a certain object

Get the number of children of a


certain object

Get a certain object’s child


with index 0

Logs the child with index 0 of


the object
Currently not supported in Python

Check whether a certain video is


playing

23
Create a variable with a certain
initial value

Store a certain CoSpace variable


under a certain name in order to
reuse it in another scene *

Get the stored CoSpace value *

Increase or decrease the value of a


variable

Use false (or true)

24
Use a certain number

Use a certain mathematical


constant (like 𝜋)

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 define


with its RGB values

Use a text that you define

Create a text string


with text you define

25
Use certain coordinates

Use a certain coordinate

Use the length of a certain variable

26
Note: To use physics on an item, enable physics with the item inspector. By
default, items ignore physics collisions and forces.

Push a certain object in a


certain direction

Push an object towards


another object

Push an object towards a


certain position

Push an object in a certain


direction at a certain speed

Make a certain object spin


in a certain direction

27
Define a duration for
physics TypeScript code
to get executed

Set the local or global speed for a


certain physics object

speed for a certain physics object

Restrict the movement of an


object on axes

Define whether an object is static


or not

28
Define whether an object can
collide with other objects

Define the friction level of a


certain object

Define the weight (mass) of a


certain object

Define the bounciness level of a


certain object

Define the gravity level in your


scene

Change the speed at which


physics happen (1 = standard
speed, 0.5 is slow motion)

29
Stop a function from executing
further

Return a certain value from a


function

30

You might also like