Suggestion: Mouse disable.

Discussion and feedback on Construct 2

Post » Tue Apr 17, 2012 9:08 pm

Suggestions:
Mouse Object -> Action -> Disable Mouse Input, Enable Mouse Input
Mouse Object -> Conditions -> MouseObjectEnabled?
Same with Touch, and Keyboard Object.

WHY?

     In my game I added support for a Mouse and for Touch screens. To test that touch works I enabled the (use mouse input) property, and disabled all conditions with the Mouse. After successful testing, I re-enabled all the mouse conditions and then disabled the touch(use mouse input) property, and exported the game, because this works I believe.. I dont have a touch screen device for development as of yet to test it. If doing development this way a Mouse->action->disable_mouse would help out, and speed up testing, I can also see it being used in other ways of development also.

Thank-you.Doverseer2012-04-17 21:13:53
B
14
S
1
G
1
Posts: 16
Reputation: 1,805

Post » Wed Apr 18, 2012 12:52 am

Why not put all your input events in to a group, and then disable or enable the group?
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Wed Apr 18, 2012 3:09 am

I forgot completely about that, I will adjust my code to that style. Thanks.
B
14
S
1
G
1
Posts: 16
Reputation: 1,805

Post » Sat Jul 07, 2012 1:29 am

That's an excellent idea. I was having a hard time pausing the game including the mouse events.
B
85
S
31
G
22
Posts: 384
Reputation: 18,587

Post » Sat Jul 07, 2012 10:41 am

also you can use a variable way to fix that ^^
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Mon Jan 06, 2014 6:52 pm

Bump for this. I'd rather have an option that disables Keyboard, Gamepad and Mouse in one event.

Also, it's counter-intuitive to merge all the inputs in one Group. Maybe I'm missing something?

What I need, is disable all inputs on Splash Screen, so the user can't enter the game until he's on the Title Screen.notnsane2014-01-06 18:54:25
B
33
S
9
G
1
Posts: 153
Reputation: 2,998

Post » Mon Jan 06, 2014 7:00 pm

Just use a different layout for the splash screen.
B
38
S
10
G
5
Posts: 597
Reputation: 7,262

Post » Mon Jan 06, 2014 10:35 pm

Just disable all three groups for all forms of input.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Mon Jan 06, 2014 11:05 pm

@notsane

Actually all input should be in one group and then using the input to call Functions that are the resulting actions. it's very easy to spread out your input but it's not a good idea.

Instead input should be structured in a similar patter to

Function.Up
Simulate Control Up


Group Gamepad
On Gamepad Axis Left 0 = UP
Then call function.Up

Group Keyboard
On Keyboard arrow up or "W" pressed
then call function.up

Group Touch
If swipe action is Up
then call function.up

.... so on etc for each input type.

This way if you need to make fundamental control chanegs they are all located in the same spot rather than spread out.jayderyu2014-01-06 23:22:04
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests