Bug with key?

Discussion and feedback on Construct 2

Post » Mon Mar 26, 2018 8:10 pm

Hi.
I keep the mouse pressed on the screen (touch is true) and then pulse space but the sprite is not destroyed.
Why?.

If you underline "Z is down" then it works.

Image

https://www.dropbox.com/s/1rt29j5le6b6d4g/testKey.capx?dl=0
B
36
S
15
G
22
Posts: 956
Reputation: 15,222

Post » Tue Mar 27, 2018 3:44 am

Yeah, that's weird. There are several forum threads like thisand this, but it doesn't seem to cover the behaviour of global plugins. I'm just speculating, but I wonder if the plugins have a 'priority' for checking a certain type.

For example if we replace Keyboard | Space is down with Touch | Is touching Sprite:

Image

.. Then hold down the mouse button, go over the Sprite, it will be destroyed.

However, Keyboard | Z is down doesn't work any more, but Touch | Is in touch works fine. It's almost like the plugin itself was 'picked' (like a SOL), but not really.

As a workaround, you can separate the conditions.

Of course, you could write it another way:

Image
B
57
S
20
G
1
Posts: 120
Reputation: 4,420

Post » Tue Mar 27, 2018 10:34 am

These WEIRD behaviors that are not documented are nefarious and can drive more than one crazy when you have a broad code.

Your idea is fine, thank you, it would be necessary to see if it is a bug or it is not a bug.
No doubt strange it is.

I use a translator and if I am right, the official documentation does not report this.

Image

By the way, what is the SOL?
B
36
S
15
G
22
Posts: 956
Reputation: 15,222

Post » Tue Mar 27, 2018 12:49 pm

SOL mean Selected Object List, which is the list of picked instances. So it's not really related, but only the question if certain entities are really being evaluated based. Because it is an OR statement, like the thread I mentioned, I wondered if either the Touch or Keyboard was not being 'selected for evaluation' because it is one or the other.

I don't know. The documentation refers to triggers as an example; it's almost as if it only applies to triggers, although it doesn't say it explicitly.

@Ashley, I was wondering if you (or anyone for that matter) could spare a brief moment to enlighten us poor souls why the OP's scenario doesn't work, and why my post (#2) behaves the way it does (i.e. it seems like when two plugins -- Keyboard and Touch -- are tested as True in an OR statement, only one of the plugins 'make it through' the sub-event in order to be evaluated). Would be much appreciated. :-)
B
57
S
20
G
1
Posts: 120
Reputation: 4,420

Post » Tue Apr 03, 2018 9:40 am

faulknermano wrote:SOL mean Selected Object List, which is the list of picked instances. So it's not really related, but only the question if certain entities are really being evaluated based. Because it is an OR statement, like the thread I mentioned, I wondered if either the Touch or Keyboard was not being 'selected for evaluation' because it is one or the other.

I don't know. The documentation refers to triggers as an example; it's almost as if it only applies to triggers, although it doesn't say it explicitly.

@Ashley, I was wondering if you (or anyone for that matter) could spare a brief moment to enlighten us poor souls why the OP's scenario doesn't work, and why my post (#2) behaves the way it does (i.e. it seems like when two plugins -- Keyboard and Touch -- are tested as True in an OR statement, only one of the plugins 'make it through' the sub-event in order to be evaluated). Would be much appreciated. :-)

Thanks for the info :)

We remain unanswered about this.
B
36
S
15
G
22
Posts: 956
Reputation: 15,222

Post » Sun Apr 08, 2018 8:49 pm

But we still do not know if it is a bug and it is necessary to report it.
B
36
S
15
G
22
Posts: 956
Reputation: 15,222

Post » Thu Apr 19, 2018 12:10 am

It is def a bug.
B
19
S
7
G
4
Posts: 182
Reputation: 4,194


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 24 guests