How do I push a dynamically created objects UID into array?

0 favourites
  • 4 posts
From the Asset Store
Push the Box Puzzle Game likes Sokoban made with Illustrator
  • If I add System>Create Object into my Layout Start event, then add On Created for that object pushing the ObjectName.UID to the array, it doesn't appear to work. I know all the objects get created, but I don't think Create Object calls On Created for the object it creates. Is there a better way to achieve that?

    Thanks folks!

  • If I am not mistaken, when you create an object with System>Create Object, the picking for the current event/action block is set to the newly created object. Therefore you should be able to do whatever you want with the new object right after it's been created, in the same block.

    Though it doesn't really solve your problem

  • With Push and by Index (remove Set size (0,1,1) for the index option).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, guys! Turns out that my ArrayName.Count just wasn't producing the right number since it was in the Start Layout event along with the creation of all the elements that went into the array. All sorted now and all elements do show up.

    Very respectfully,

    Tyler

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