What it does
CreatePhysicsForce brings a 2DPhysics object into being: it is how the rest of the program comes to have one. It takes x (a float), y (a float), power (a float), limit (a float), range (a float) and fade (an integer), and answers an integer.
Syntax
CreatePhysicsForce(x float, y float, power float, limit float, range float, fade integer) → integerParameters
| Name | Type |
|---|---|
| x | float |
| y | float |
| power | float |
| limit | float |
| range | float |
| fade | integer |
Every form returns
integer
Example · generated
physicsForce = CreatePhysicsForce(100.0, 120.0, 1.0, 1.0, 1.0, 1)DO Sync()LOOPCreatePhysicsForce is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.