Referencing newly created object

This forum is currently in read-only mode.
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • So I'm using Create OBject By name to create an object in the Items family. However, doing a For Each Items, Set XY does not affect these newly created objects. Any ideas on how to get around that?

  • So I'm using Create OBject By name to create an object in the Items family. However, doing a For Each Items, Set XY does not affect these newly created objects. Any ideas on how to get around that?

    Well, unfortunately you cannot simply do that (anymore, since it used to work but was removed due to being part of an actual bug). So no, you can't pick an object created by name in the very same tick with events afaik.

    You can still pick the newly created object by family if you call a function with a minimal delay that manipulates it. It may be necessary to use a PV too, to avoid picking already manipulated members of that family.

  • Thanks. I'm at work now so i can't check, is there a simple Delay X ticks action I can just put in after the Create Objects by name action that would take care of it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. I'm at work now so i can't check, is there a simple Delay X ticks action I can just put in after the Create Objects by name action that would take care of it?

    The function object has an action to call a function after a delay. Read more about it on the wiki.

  • That does work, thanks. I was wondering though, is it on the next tick that I can move the items? If so, is there a way to delay a function by tick amount? I can only find milliseconds, and I know it's unlikely but in the rare case of a hickup (perhaps a user would be runnign multiple apps in teh background) that might cause it to not work since the current tick might last a longer time than the millisecond delay I have.

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