Disable/Enable M&K

New releases and general discussions.

Post » Sat Dec 05, 2009 12:50 am

I really, REALLY want an action to temporarily disable/enable input to a Mouse&Keyboard Plugin, to prevent players from wandering away during cutscenes or overlay sequences.

I'm still trying to find a good way to kludge my way around this in the meantime, and I'm having trouble.
B
2
S
1
G
3
Posts: 43
Reputation: 1,086

Post » Sat Dec 05, 2009 1:05 am

You could put all of your mouse and keyboard events into a group(in the event sheet editor: Right Clicke -> Insert group) and disable/enable the group as necessary.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Sat Dec 05, 2009 4:08 am

You could also use timescale, as long as your cut scenes don't use timedelta, and the player movement does.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Dec 05, 2009 5:25 am

you could probably just delete the m&k object and then create a new instance when you want it back
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Sat Dec 05, 2009 8:08 am

Or use a finite state machine... simply check 'state' global variable and put the following into your M&K events:

+ 'state' not equal to "cutscene"
> M&K events
+ 'state' equal to "cutscene"
> allow space/esc key to skip the cutscene (some people hate having to sit and watch long cutscenes they've seen)

Everything is so much easier with states.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Dec 05, 2009 1:07 pm

If you have build in Movement just use "set ignore input" action
If you have custom event Movement then put every event to one group and disable during cutscene.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests