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
13
S
1
Posts: 59
Reputation: 1,901

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
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

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
13
S
1
Posts: 59
Reputation: 1,901

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
13
S
1
Posts: 59
Reputation: 1,901


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 6 guests