Clickteam Fusion 2.5

Clickteam Fusion 2.5

SamuraiDan Aug 16, 2021 @ 10:14am
how do I flip a sprite based on the mouse's position relative to the player?
I have a gun that aims correctly, but when I aim to the left of my player it just flips upside down and looks wrong. I have a second sprite that flips it so the orientation is correct, but I can't find any way to check whether the mouse is to the left or right of the player to change the frame with. a little help, please?

if it helps, I'm aiming the gun by setting the angle equal to a vector that's set to xmouse and ymouse.
Originally posted by drgonzo42:
Maybe late but I want to make clear that you CAN track your mouse position. You just have to use "Compare two general values" from the "Special" conditions.

* XMouse > X( "Player" )

* XMouse < X( "Player" )
< >
Showing 1-4 of 4 comments
SamuraiDan Aug 16, 2021 @ 7:17pm 
figured it out almost by pure accident. anyway, I have an aiming reticle that follows my mouse and I check the position of the reticle itself. if it's greater than the x position of player I set the gun to the "facing right" frame, and if it's less than the player's x position -1 I set the frame to the "facing left" frame. I guess that reticle was the piece of the puzzle I was missing, since I can't track the mouse's position directly I had to add an object that could track it for me.
The author of this thread has indicated that this post answers the original topic.
drgonzo42 May 3, 2022 @ 5:05am 
Maybe late but I want to make clear that you CAN track your mouse position. You just have to use "Compare two general values" from the "Special" conditions.

* XMouse > X( "Player" )

* XMouse < X( "Player" )
SamuraiDan May 3, 2022 @ 9:53am 
wow, maybe late is right. this is from a year ago! I don't know if that feature even existed when I made this question. thanks, though.
Linky May 6, 2022 @ 5:46am 
Originally posted by SamuraiDan:
wow, maybe late is right. this is from a year ago! I don't know if that feature even existed when I made this question. thanks, though.
This existed since Klik and Play which released in the 90's
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Aug 16, 2021 @ 10:14am
Posts: 4