Hi @Dave, thanks for your help, here's the link : NLCU7MND54. Hope you'll understand my problem (if it really is ! )
However it doesn't really matter, i'm already working on a new project (3d car chase).
The joystick values only tell you where the joystick is being pushed relative to the centre. What you want is a separate set of variables for the cursor position - these will then be used to keep track of the the screen position of the cursor:
// Create some variables to store cursor position - let's begin in the centre of the screen
cursor_x = gwidth() / 2
cursor_y = gheight() / 2
// Main loop
c = controls(0)
// Apply the left stick values to the cursor position variables with a movement speed multiplier (change the * 2 for faster/slower movement)
cursor_x += c.lx * 2
cursor_y -= c.ly * 2
// Draw the circle at cursor positions
circle(cursor_x, cursor_y, 32, 32, white, false)
To check collision with an area of the screen, we must use if statements to check the cursor_x and cursor_y values. For example:
if cursor_x > 100 and cursor_x < 200 and cursor_y > 50 and cursor_y < 150 then
// We know that the cursor is in a particular screen region here
To achieve this same thing with sprites would be a bit easier in terms of collision, but it would mean all of the objects that the cursor interacts with would also have to be sprites in order to use the collision functions like detectSpriteCollision() with them. It definitely takes some more set up, but it will be worth it for ease of use. The thing to remember however is that Sprites use Game World co-ordinates rather than screen co-ordinates.
In Game World coords, (0, 0) is the centre of the screen, and the limits of the x and y axes on screen are determined by sprite camera position. Check out Help -> Command Reference -> Sprite System in FUZE for a detailed document about how sprites differ to normal drawing.