Why are the functions of Construction 3 out of order?

0 favourites
  • 7 posts
From the Asset Store
A set of vector game assets contains ground tiles and several objects, used for creating platformer games
  • (I'm using a translator.)

    I want to change the value to a function. But if I do that, the order has changed.

    For example,

    This result outputs zero, contrary to normal expectations.

    This is true of the instances that I create. If you manipulate the created instance from a function, nothing changes. The same applies to using IIDs in actions or events. However, when 'Pick last created' is used, it works normally.

    Is this a bug? Or do I not understand the functional structure of Construction 3 well? Then, please show me the related documents. Thank you.

  • This is true of the instances that I create. If you manipulate the created instance from a function, nothing changes. The same applies to using IIDs in actions or events. However, when 'Pick last created' is used, it works normally.

    For instances, it is not possible to import directly into the 'Pick nth instance' sub-event after creation. But it can also be imported as 'Pick last created'. Is this normal..?

  • Yes, that is normal. When New instances are created they are not fully created until the next top level event is reached.

    You can use Pick last created, or Pick by UID, but other methods are not available until the event that created the instances completes (which includes branching to functions).

  • Yes, that is normal. When New instances are created they are not fully created until the next top level event is reached.

    Oh, I didn't know that! Also I can pick with UID.

    But what about the image I showed you? It's not related to the instance, but it works on the same principle..

  • I can't see what the function does, but since it is called from the same "On start of layout" event, any objects created will not be fully created until the next top level event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AllanR Um.. can you take it one more time?

    The image above, when the layout begins, runs a function that adds 1 to the group variable and displays the variable in text. This is actually added, but zero is displayed.

    On the other hand, when I add 1 to a group variable without using the function(as shown below), the plus numbers are displayed normally.

    By any chance, is a variable or function also an object?!

  • Wait, The problem was reset every time because I added the group variable as a function called instead of a static variable!

    Your advice helped me a lot. Thank you so much!

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