R79.4 object clicked

Bugs will be moved here once resolved.

Post » Sun Feb 26, 2012 12:04 pm

Seems the trigger for on object clicked/ touched is being registered past its event.
http://dl.dropbox.com/u/666516/objectclickntouchbug.capx
In the cap I used the touch object with use mouse enabled, but also tested with the mouse object, same result.
Testing with the system wait resolved the issue.

The expected behavior is one click add 1 to a gv, and then compare that gv for something else.newt2012-02-26 12:07:48
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Mar 04, 2012 4:54 pm

What's the bug? It looks like you just add 1 to a global value, which instantly makes the next event true.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Mar 04, 2012 5:48 pm

Right
If you toggle the wait in event 5 to off you will see that the variable pick is added to from the next event, even though its conditions haven't been met. Basically you should have to click again in order for that event to happen.
Somehow on click, or on touch, which should be like a trigger once, is being carried over.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Mar 04, 2012 6:28 pm

Yeah, isn't this just because both triggers fire at once in top to bottom order?

'pick' starts at 0
Event 5 fires and sets 'pick' to 1
The trigger continues firing down the event sheet, so then event 7 triggers, and 'pick' was just set to 1 so it runs, and sets 'pick' to 2

So not a bug, just the order of your events?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Mar 04, 2012 6:41 pm

Ok
Yeah, order does change it up, but still the condition was not true at the time of the click.
I can accept it as not a bug, since it has work a around, but somewhere a vulcan is now crying.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Mar 04, 2012 7:59 pm

OK. Triggers have to trigger in some order, and they check their parent conditions at the moment they run, so it's just an order of events issue. Closing as by design.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Jul 21, 2012 8:22 pm

also had the same problem, i had s sprite(1) which was supposed to transform into another sprite(2) when clicked and vice versa but when i click sprite(1) it transforms twice ie into sprite(2) and then back to sprite(1). i used click event but it was coming out as a double click or rather prolonged click.
B
15
S
2
G
3
Posts: 4
Reputation: 2,523


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest