Container/Event touch problem

Discussion and feedback on Construct 2

Post » Thu Oct 24, 2013 1:59 am

Hi

I have 2 object types in a container. Event on one object instance -> Action on its container twin type instance doesn't work with 'Touch - Is touching'. It does however work with 'Touch - On touched' and 'Mouse - Cursor is over'.

I would expect only one container instance, to be affected by the given event and corresponding action, in all 3 cases.

What I would like to know is, do I misunderstand something about events/containers/touch or is this a bug?

(Capx in post below - forum will not allow me to edit and update post, when it contains a hyperlink.)

Cheers,
thegrind

(edit: improved explanation)thegrind2013-10-24 16:16:50
B
26
S
9
G
2
Posts: 78
Reputation: 2,524

Post » Thu Oct 24, 2013 4:09 am

Very simple linked capx exemplifies clearly:

http:// ak47.dk/test/demo/event_touch_demo.capx

(Please look at the event sheet and try to toggle)

I tested it in Chrome on a PC with a mouse.
B
26
S
9
G
2
Posts: 78
Reputation: 2,524

Post » Thu Oct 24, 2013 4:43 am


@thegrind,

Awesome find. However, I see that the bug is slightly different to how you describe it. I think something is not working as it should here, though.

Here is what I see:

"On touched" works correctly for me; the event causes only the Sprite in the touched Sprite2 container to rotate.

"Is touching" and "cursor is over" affects all of the Sprites, as if the trigger was affecting all of the containers at the same time. My understanding is thtat the other Sprites should not rotate - the trigger event should only pick the instance and associated container that is touched/mouse-over. Unless anyone sees my interpretation as incorrect, I suggest you submit this as a bug report with this.

Interesting that you don't see any effect with On Touched....
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,244
Reputation: 46,462

Post » Thu Oct 24, 2013 3:33 pm

'On touched' and 'Cursor is over' are working fine here. 'Is touching' is affecting all sprites. Seems to be different to what both of you are saying...
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Thu Oct 24, 2013 4:11 pm

It looks like a bug. I found the mistake and hopefully it's corrected in the next build.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Thu Oct 24, 2013 4:15 pm

Yes, that was also my observation. I see I managed to explain it differently in OP :)

(OP fixed)thegrind2013-10-24 16:17:52
B
26
S
9
G
2
Posts: 78
Reputation: 2,524


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests