Ignore mouse input/animations

For questions about using Classic.

Post » Sat May 02, 2009 4:17 pm

I would like to ignore all mouse input, so that I can ignore all animations (which start by a pressed mouse button).

I have tried the following:
start of layout
> *choose object mousekeyboard*, but no option to ignore mouse-input there, as action.
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Sat May 02, 2009 4:57 pm

Use a global variable as a toggle and check whether it is activated or not. You can toggle it with events, key press or whatever whenever you want the stuff to ignore mouse.

+'IgnoreMouse' = 0
+Mouse button is pressed
>blah blah
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat May 02, 2009 5:26 pm

[quote="Mipey":1ioxcvr5]Use a global variable as a toggle and check whether it is activated or not. You can toggle it with events, key press or whatever whenever you want the stuff to ignore mouse.

+'IgnoreMouse' = 0
+Mouse button is pressed
>blah blah[/quote:1ioxcvr5]

But I have no means to de-activate the mouse-button-control.
Perhaps I don't see what you mean.

When mouse button is pressed, an animation starts.
At a certain point I want to ignore key presses (or: not start animations).

Both options (ignore mouse-buttons, don't start any animation) are not present in the event's action list.
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Sat May 02, 2009 5:39 pm

Mipey's suggestion would work, change IgnoreMouse to 1 and the event stops running. Or, put all the events in a group, and disable the group when you want the events to stop running.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat May 02, 2009 6:23 pm

Couldn't you just use "animation is playing" inverted, along with the on click event in the condition?
So it would be like:
MouseKeyboard: On Left mouse button Clicked
Sprite: Animation "Default" is not playing
> SpriteSet animation to "Default"
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Mon May 04, 2009 6:01 pm

Thanks for the suggestions. I've tried it out.
B
16
S
5
G
7
Posts: 599
Reputation: 5,000


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests