Certain Keyboard conditions not working

Bugs will be moved here once resolved.

Post » Sat Sep 17, 2011 5:00 pm

I've encountered a strange bug involving keyboard conditions not working when coupled with local/instance variables. It's quite bizarre. Thankfully, due to Construct 2's ability to transfer events and objects between caps, it's MUCH easier to reproduce the problem in an isolated cap.

Basically, the "attack" option works, but you can't exit out of the attack menu with B, and space bar doesn't work when trying to select 'item'. Mouse controls work perfectly, however... Though, in my project, at some point they stopped working entirely in that one layout. Strange.

Example capx

This problem was more pronounced in earlier caps, forcing me to use workarounds (such as layer visibility, which kinda has been rather useful in other ways), but at some point it became simply unfeasible to work around stuff by the point I hit the 'item' problem.Candescence2011-09-17 17:03:08
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Sat Sep 17, 2011 6:51 pm

[QUOTE=Candescence]Thankfully, due to Construct 2's ability to transfer events and objects between caps, it's MUCH easier to reproduce the problem in an isolated cap.[/QUOTE]

Has that been fully implemented? I thought it wasn't finished yet.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Sat Sep 17, 2011 7:32 pm

[QUOTE=Arima] [QUOTE=Candescence]Thankfully, due to Construct 2's ability to transfer events and objects between caps, it's MUCH easier to reproduce the problem in an isolated cap.[/QUOTE]

Has that been fully implemented? I thought it wasn't finished yet.[/QUOTE]
Oh, it works. Though, I had to copy events within the original project and remove certain conditions/actions to actually make it work with the new cap, first. But copying objects works perfectly.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Sat Sep 17, 2011 7:34 pm

I had a quick look, but are you aware that triggers only run if all their parent events are true too?

For example, you have 'On B pressed' as a subevent to "Layer ItemSelection is visible". If that layer is not visible, the 'On B pressed' trigger won't fire.

Can you reproduce an issue with triggers which are not in subevents or do you think it's just how you've set up the events?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Sep 18, 2011 8:00 am

Thing is, the 'On B pressed' events should be working fine. They work perfectly in my original project, that's for sure. The parent events should not be conflicting, period.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Sun Sep 18, 2011 2:38 pm

Should they? It's not obvious whether this is a bug in Construct 2 or a logic problem in your events. It's very difficult and time consuming for me to check the project to verify the logic of the events is indeed sound, and therefore the problem must only be a bug in Construct 2. I'll double check some time in future, but it would save tonnes of time if you could reproduce keyboard events not working in an empty project with as few events as possible.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Sep 18, 2011 7:16 pm

That... MIGHT be a little tricky! The capx as it is, well, is more or less stripped straight down from the original project. It's hardly that much. I've stripped the whole thing down even further to what should be the most essential events for the cap to show the problem - it should be to the point where it should be easy to determine whether it's a bug or a logic problem.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Sun Sep 18, 2011 7:19 pm

It's still a lot for debugging - the same function is called in the engine for all the events, so diagnosing projects with more than 5 events that way gets pretty difficult. Still, if you can't get it any less than that, I can take a look some time soon.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Sep 18, 2011 7:30 pm

Yeah, can't really strip it down any further, sorry.

Though, I realized why the B conditions weren't firing, mainly to do with the "SelectionTimer" variable not decreasing via DeltaTime when above 0 as it should be (it does decrease in the original project), mainly to prevent key presses from skipping over menus. So THAT is not a bug, I fixed it.

But the fact that the Space key condition doesn't fire with the Item selection is still the main problem.Candescence2011-09-18 19:30:43
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Sun Sep 18, 2011 7:50 pm

[QUOTE=Candescence]But the fact that the Space key condition doesn't fire with the Item selection is still the main problem.[/QUOTE]
When I try it, it seems to work fine. If I hit space on menu items 1 or 4 it appears to switch to a different menu. Is that what's supposed to happen? If not what is supposed to happen?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest