I am working on a Bloons prototype scratch level, so I need a physics engine that will record the mouse position and length away from sprite and make a sensible trajectory.
Offline
Can Anyone help me?
I would really like it.
Offline
I don't know, but you might get better help in Advanced Topics. This is more complicated than a normal script due to the physics. You could always fake it, though.
Offline
you can get the mouse coordinates and the distance of a sprite to a mouse with blocks under "sensors"
(mouse x) (mouse y) (distance to [mouse-pointer])Probably something like this:
set [ratio] to (((y position)-(mouse y))/((x position)-(mouse x))) set [ratio] to ([atan] of (ratio)) set [x-velocity] to (([cos] of (ratio))*(speed)) set [y-velocity] to (([sin] of (ratio)) * (speed))
Last edited by MoreGamesNow (2012-02-15 21:58:18)
Offline