CreatePhysicsForce

Family: 2DPhysics · One form

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) → integer

Parameters

NameType
xfloat
yfloat
powerfloat
limitfloat
rangefloat
fadeinteger

Every form returns

integer

Example · generated

physicsForce = CreatePhysicsForce(100.0, 120.0, 1.0, 1.0, 1.0, 1)DO  Sync()LOOP

CreatePhysicsForce 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.

66 commands in 2DPhysics