PhysicsForceRange

Family: 2DPhysics · One form

What it does

PhysicsForceRange writes to a 2DPhysics object: it sets rather than reads. It takes forceID (an integer) and range (a float), and returns nothing. forceID is the id of a Force object, obtained elsewhere in the 2DPhysics family.

Syntax

PhysicsForceRange(forceID integer, range float)

Parameters

NameType
forceIDinteger
rangefloat

Every form returns

nothing

Example · generated

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

CreatePhysicsForce is there to give the call something to act on; PhysicsForceRange is the line that matters. 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