I'm not quite sure how to use the 2d physics commands to make an object fall.
Example: A crazy person running toward a cliff and falls. How can I accomplish this? Below is my WIP progress code, where I would like to apply the falling physics on a fruit.
Basically, I want the conveyor belt moves the fruit and then the fruit should fall after it's no longer on the conveyor belt.
// set window properties
SetWindowTitle( "Carrot Life" )
SetWindowSize( 800, 480, 0 )
// set display properties
SetVirtualResolution( 800, 480 )
SetOrientationAllowed( 1, 1, 1, 1 )
//set bg color
SetClearColor( 155, 155, 155 )
LoadImage ( 1, "belt.png" )
LoadImage ( 2, "pot.png" )
LoadImage ( 50, "fruit.png" )
CreateSprite ( 1, 1 )
CreateSprite ( 2, 2 )
CreateSprite ( 50, 50 )
SetSpritePosition ( 1, 200, 300 )
SetSpritePosition ( 2, 0, 350 )
SetSpritePosition ( 50, 800, 250 )
SetImageWrapU(1, 1)
SetImageWrapV(1, 1)
//SetSpriteUVScale(1, .25, .25)
//SetSpriteUV(1, 0,0, 0,3, 3,0, 3,3)
//SetSpritePhysicsOn ( 1, 2 )
//SetSpritePhysicsOn ( 50, 2 )
//SetSpritePhysicsVelocity ( 50, -1, -1)
//SetPhysicsGravity ( 10, 10 )
WrapU# = 0
WrapV# = 0
fruitX# = 800
do
inc WrapU#, 0.002
fruitX# = fruitX# - 1
//scroll conveyor belt
SetSpriteUVOffset(1, WrapU#, 0)
//move fruits
SetSpritePosition(50, fruitX#, GetSpriteY(50))
Print( ScreenFPS() )
Sync()
loop