I have a subroutine where 3 windmills turn. On those 3 windmills I drop 100 balls. When the balls settle down, 2 of the windmills stop spinning because the weight of the balls.
I have set the motors to a very strong setting of 1990000, but still, they stop spinning because the weight of the balls. What is the strongest setting I can set the motors to keep the windmills spinning?
setup as integer
run_windmills: `(make three windmills) subroutine
if setup = 0
// load three images
LoadImage ( 1000, "Base_plate.png",1 ) ` (base plates for motors)
LoadImage ( 1002, "Base_plate.png",1 )
LoadImage ( 1004, "Base_plate.png",1 )
CreateSprite ( 1000, 1000 ) `make the 'base-plate' sprites
CreateSprite ( 1002, 1002 )
CreateSprite ( 1004, 1004 )
SetSpritePosition ( 1000, 450 , 650 ) `place the base-plates at 3 different positions on the screen
SetSpritePosition ( 1002, 850 , 940 )
SetSpritePosition ( 1004, 250 , 940 )
SetSpritePhysicsOn ( 1000, 1 ) ' make the base-plates stationary
SetSpritePhysicsOn ( 1002, 1 )
SetSpritePhysicsOn ( 1004, 1 )
LoadImage ( 1001, "Blade.png",1 ) `load the images for windmill blades
LoadImage ( 1003, "Blade.png",1 )
LoadImage ( 1005, "Blade.png",1 )
CreateSprite ( 1001, 1001 ) ` make the windmill sprites
CreateSprite ( 1003, 1003 )
CreateSprite ( 1005, 1005 )
SetSpritePosition ( 1001, 450 , 650 ) `position the windmill-blades over the base-plates
SetSpritePosition ( 1003, 850 , 940 )
SetSpritePosition ( 1005, 250 , 940 )
SetSpriteShape ( 1001, 3 ) ` set the windmills shape as polygons
SetSpriteShape ( 1003, 3 )
SetSpriteShape ( 1005, 3 )
SetSpritePhysicsOn ( 1001, 2 ) ` make the blades free to move
SetSpritePhysicsOn ( 1003, 2 )
SetSpritePhysicsOn ( 1005, 2 )
// connect them together using a revolute joint
CreateRevoluteJoint ( 1111, 1000, 1001, 450 + 22, 650 + 67, 0 ) `connect the windmill blades to the base plate with a revolving joint
CreateRevoluteJoint ( 1113, 1002, 1003, 850 + 22, 940 + 67, 0 )
CreateRevoluteJoint ( 1115, 1004, 1005, 250 + 22, 940 + 67, 0 )
// turn the motor on for these joints
SetJointMotorOn ( 1111, 6.05, 1990000) ` start the motors problem- (strength of the motors is set at 1990000, but that is not strong enough to keep the blades spinning.)
SetJointMotorOn ( 1113, 6.05, 1990000)
SetJointMotorOn ( 1115, -6.05,1990000)
setup = 1
endif
return
.