Bug with object creation and selection in the same event

0 favourites
  • 2 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)