PhysicsForcePower

Family: 2DPhysics · One form

What it does

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

Syntax

PhysicsForcePower(forceID integer, power float)

Parameters

NameType
forceIDinteger
powerfloat

Every form returns

nothing

Example · generated

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

CreatePhysicsForce is there to give the call something to act on; PhysicsForcePower 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