How do I detect mouse.X left/right direction?

Get help using Construct 2

Post » Wed Oct 07, 2015 6:40 am

Hello,

Been awhile since I used C2. I forgot and cant seem to find how to detect mouse.x if it is growing or decreasing so I can pass some left and right vars. Simple I am sure, but cant figure it out and I am on a tight deadline. So,.. need some help. :D
B
14
S
2
Posts: 67
Reputation: 2,044

Post » Wed Oct 07, 2015 7:10 am

check if mouse.x is greater than variableX
if greater, then set direction to right, else left.
set variableX to mouse.x
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Wed Oct 07, 2015 2:55 pm

That is how I had it, but I am only able to detect if mouse.X is greater or less if I delay the varX. Otherwise it will never be greater or less it will be the same.
B
14
S
2
Posts: 67
Reputation: 2,044

Post » Wed Oct 07, 2015 3:15 pm

Ahh. Stupid me. I had the varX set in everytick and not the if statement itself.
B
14
S
2
Posts: 67
Reputation: 2,044


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 7 guests