Bug with object creation and selection in the same event

Bugs will be moved here once resolved.

Post » Tue Apr 22, 2014 4:53 pm

Problem Description
When I create an object, I cannot select or interact with instances of that object created in the same event.

Attach a Capx
https://dl.dropboxusercontent.com/u/770 ... p_bug.capx

Description of Capx
Demonstrates that objects spawned in the same top-level event are inaccessible via selection. If it worked as expected, three yellow "spawnee" objects would be left, right, and below a central sprite. There are log messages that help demonstrate some of the weirdness. In particular, note that there's something weird going on with the count: the spawnees have a count of 0 at the top of a loop, but increments as I would expect within the loop.

Steps to Reproduce Bug
  • Create an object in one scope within a top-level event
  • Try to interact with that object in a sibling scope.

Observed Result
No interactions with the object seem possible.

Expected Result
I expect to be able to select and interact with other objects that have been spawned in the same top-level event. I'm a little baffled that I apparently can't.

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

Operating System and Service Pack
Windows 7 SP1

Construct 2 Version ID
r163
B
6
S
1
Posts: 8
Reputation: 350

Post » Thu Apr 24, 2014 12:21 pm

Closing as won't fix. Due to the way the event engine works, it is necessary that created/spawned instances are not fully created until the end of the next top-level event (in this case, the entire "trigger once" branch must finish before the instance is fully created). Otherwise it can only be accessed in the very same event it was created in. Workaround: use separate top-level events, firstly creating any objects you need, then manipulating them.

BTW "pick spawnee instance 1" makes no sense as a sub-event to a "spawn" action. The "spawn" action picks just the created instance. Everything is zero-based, so picking instance 1 picks the second instance; no such instance exists.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests