What it does
CreatePulleyJoint brings a 2DPhysics object into being: it is how the rest of the program comes to have one. It takes jointID (an integer), spriteID1 (an integer), spriteID2 (an integer), gnd1x (a float), gnd1y (a float), gnd2x (a float), gnd2y (a float), a1x (a float), a1y (a float), a2x (a float), a2y (a float), ratio (a float) and colConnected (an integer), and returns nothing. jointID is the id you are giving a Joint object: every later call names it by that number.
Syntax
CreatePulleyJoint(jointID integer, spriteID1 integer, spriteID2 integer, gnd1x float, gnd1y float, gnd2x float, gnd2y float, a1x float, a1y float, a2x float, a2y float, ratio float, colConnected integer)Parameters
| Name | Type |
|---|---|
| jointID | integer |
| spriteID1 | integer |
| spriteID2 | integer |
| gnd1x | float |
| gnd1y | float |
| gnd2x | float |
| gnd2y | float |
| a1x | float |
| a1y | float |
| a2x | float |
| a2y | float |
| ratio | float |
| colConnected | integer |
Every form returns
nothing
Example · generated
CreatePulleyJoint(1, 1, 1, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1)DO Sync()LOOPCreatePulleyJoint is called with values of the types its signature asks for. 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.