A [ ball ] object is what its name suggests, a ball. You can add a ball or a bunch of balls to add some dynamic gameplay to your design.
You can grapple (e), shoot (f), carry (c), and throw (r) balls.
Building with [ ball ][]
To add a ball type the following into the terminal:
- add ball
To add a column [ col ] of ball's type:
- col ball 0 10 5
To add a row of ball's type:
- row ball 0 10 5
Customizing a [ ball ][]
You can use the [ get ] and [ set ] commands to get and set all your ball characteristics. Here's an example of using the [ set ] command to change the radius of your ball:
- set ball0 radius:60
[ get ] and [ set ] are very important to know in order to customize your games, make sure to read our wiki entries about them in the codePop library section.
Running a [ get ] shows you 30 characteristics of a ball that you can change. These are listed below:
active | allowRotation |
alpha |
angle |
blendMode | bodyType |
bounce | bumpForce |
bumpable | callbacks |
classCollisionsOn | collisions |
collisionsOn | density |
dynamicFriction | gravMass |
gravMassMode | gravMassScale |
magnetic | mass |
radius | rollingFriction |
skin | staticFriction |
team | velocityX |
velocityY | visible |
x | y |