'While key is down' is disabling 'key is pressed' events

Get help using Construct 2

Post » Sat Jun 21, 2014 1:59 am

Hey Construct Community,

I'm making a 2D combat system and when I added the events that enabled the player to block with a shield while holding down a key, it disabled my attack which uses a 'key is pressed' event. I have no idea how to fix this.

I've labeled my events with comments, the Block and Attack are at the bottom of the event sheet.

Here is the .capx: https://www.dropbox.com/s/sqs18wj10ny4b ... lgame.capx
B
22
S
4
G
1
Posts: 153
Reputation: 1,938

Post » Sat Jun 21, 2014 5:00 am

I'm not sure this is your solution, but on a quick test it seems to work so might help.

I've moved events around a bit so I could 'else' the key down ones.

medievalgame.capx
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Jun 21, 2014 6:00 am

It works, thanks codah! All you did was move the events around in the event sheet?
B
22
S
4
G
1
Posts: 153
Reputation: 1,938

Post » Sat Jun 21, 2014 6:50 am

Not all.. I 'elsed' the check of keys down. You can only have one of those states valid at one time anyway. Check the capx and compare with yours :) The order of events itself is not important.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: datiel12, tarek2 and 59 guests