Creating Objects, Triggered Events, and Object Picking

Bugs will be moved here once resolved.

Post » Sat Oct 04, 2014 10:27 pm

Problem Description
After creating an object, it will not be available for object picking in triggered events until the next tick (pick by UID still works)

Attach a Capx
https://dl.dropboxusercontent.com/u/207 ... cking.capx

Description of Capx
Clicking anywhere spawns a sprite on the left side of the screen. It travels to the right.
It sets the width to 4. It should also set the height to 4, and turn it from red to blue.

Steps to Reproduce Bug
  • Run project.
  • Click anywhere.
  • Observe size and color of the box.
  • Click again while the box is still on the screen.
  • Observe size and color of both boxes.

Observed Result
The created box is still red and 16 pixels high.

Expected Result
The created box should be blue and 4x4.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 7 Home SP1 (x64)

Construct 2 Version ID
Release 180 (64 bit)
Release 183 (64 bit)

Additional Notes
There may be more cases where this problem manifests, ones that don't involve triggered events at all.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Sat Oct 04, 2014 11:45 pm

Hi Johncw87. Have you read this https://www.scirra.com/forum/viewtopic.php?t=73647&start=0#352637

PS: try putting a system:wait 0 after the Create object.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Oct 04, 2014 11:59 pm

I don't need a workaround. Picking by UID works just fine as a workaround. However, this bug is a very unintuitive behavior of object picking that trips up even the more experienced construct 2 users, as seen here. It's like one of those silly exceptions in English. "I before E, except after C..." followed by a bunch of exceptions few people care to remember.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Mon Oct 06, 2014 9:08 am

@Johncw87
i have noted some weird behaviour about picking :/
on recent versions

im having problem respawning an sprite an then assingning that sprite the UID of another and then seting position to it...

update!

i was picking by comparison and having problems... then i cnaged to pick by UID and then its working now... weird... before i had no problem using picking by comparison
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Mon Oct 06, 2014 3:52 pm

Closing as by design, it's a quirk of the engine. Duplicate report with more explanation here: https://www.scirra.com/forum/sprite-object-is-not-destroyed-properly_t116572
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests