How do I keep my cursor with an area

Get help using Construct 2

Post » Fri Jul 10, 2015 11:48 pm

Hi,

How do I keep my cursor inside the playing area?

I was thinking of setting the mouse to bound to layout..is that possible?

I thought I used to see my mouse object in the object area(bottom right) but I don't see it anymore in my project.

I'm looking at the mouse condition and I don't see anything that would help me.

Did I miss something?

Thank You.
B
24
S
4
Posts: 78
Reputation: 1,308

Post » Sat Jul 11, 2015 7:02 am

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 5:07 pm

Hello LittleStain,

I tested out and it did worked exactly the way I wanted.

Thank you so very much.

Trimeister
B
24
S
4
Posts: 78
Reputation: 1,308

Post » Mon Jul 13, 2015 5:19 pm

Hi Littlestain,

Is there a way for me to keep the cursor bound to layout?

Thanks.
B
24
S
4
Posts: 78
Reputation: 1,308

Post » Mon Jul 13, 2015 5:25 pm

I'm not sure what you mean..

what would be the difference between bound to layout and my example?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 5:37 pm

Hi,

For the cursor to stay within the white area.

Like we can set any object to 'bound to layout' but can we do the same for the cursor?

For example: if I have a playing field of W=200 and H=400 I wold want the cursor to be bound inside W=0 - 200 and H=300 - 400(bottom 1/3 of the playing area)

Thank You.
B
24
S
4
Posts: 78
Reputation: 1,308

Post » Mon Jul 13, 2015 5:51 pm

Yeah I guess if you don't want the mouse coordinate ever to be exactly 0 you could do it like this:

https://dl.dropboxusercontent.com/u/485 ... ut%29.capx
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 6:12 pm

Yes this will work fine.

Thank you for helping me.
B
24
S
4
Posts: 78
Reputation: 1,308

Post » Mon Jul 13, 2015 10:16 pm

Why did you open a new topic for the bottom third?

You can use this capx for that, just change the values in the expressions..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Euduardo, Kin, Laurent, mikehive, ratboy3, tinhofiel and 45 guests