Keys moving screen around

Get help using Construct 2

Post » Thu Mar 21, 2013 9:06 pm

Isn't there some way to stop the arrow keys/space bar from responding to the browser? What I mean is, sometimes the arrow keys scroll the edges of the screen around but I'm also using those keys for my game, so not only do those keys control my player but they also cause the browser to scroll around.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Thu Mar 21, 2013 11:23 pm

alternative: use WASD
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Fri Mar 22, 2013 1:43 am

Yeah that's what I've done for now but I feel it's a temporary measure as a lot of people prefer to use keys. I should probably work out why the screen is scrolling around in the browser in the first place.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Fri Mar 22, 2013 2:24 am

If you are using key down for the arrow keys or the spacebar it doesn't trap the keys before the browser gets them. To fix this, make events for key PRESS for the arrow keys and the space bar and just leave them blank with no actions.

Any events C2 finds will be blocked from reaching the browser.

See the manual entry for the keyboard object for more info.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Fri Mar 22, 2013 3:55 am

Cheers.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633


Return to How do I....?

Who is online

Users browsing this forum: mindragon73, suicidenutella, Vallar and 0 guests