/* Steer fly carrot with mouse 1.0, by Violet CLM http://www.jazz2online.com/snippets/126/steer-fly-carrot-with-mouse/ */ void onPlayer(jjPLAYER@ play) { if (play.fly == FLIGHT::FLYCARROT) { play.ySpeed = (jjMouseY + play.cameraY - play.yPos) / 8; //adjust "8" until you get a speed/distance ratio that feels right to you play.xSpeed = (jjMouseX + play.cameraX - play.xPos) / 8; play.direction = (play.xPos > jjMouseX + play.cameraX) ? -1 : 1; } }