DeletePhysicsForce

Family: 2DPhysics · One form

What it does

DeletePhysicsForce removes a 2DPhysics object: after it, the id names nothing. It takes forceID (an integer), and returns nothing. forceID is the id of a Force object, obtained elsewhere in the 2DPhysics family.

Syntax

DeletePhysicsForce(forceID integer)

Parameters

NameType
forceIDinteger

Every form returns

nothing

Example · generated

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

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

Related commands

66 commands in 2DPhysics