For loop not working in "on start of layout"

0 favourites
  • 9 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies.
  • A pretty simple problem.

    My for loop works fine outside "on start of layout", but when it's nested under it doesn't work. :/

    I was basing this off another similar tutorial and I -swear- I have everything exactly the same, but obviously I am missing something.

    Here is the capx :

  • How do I post a link to the capx?

    I guess this will do for now until I can post links : mediafire DOT com/?8y8vivl1j0685b5

  • Can you explain what is different on this than from my own? I feel like I am going insane. I don't see a difference.... like on the CAPX I uploaded, when I drag the for loops under "on start of layout" so they are nested, it doesn't work. :/

    Here is a screenshot

    I copy pasted your code to my project and it didn't work.

    Is my project bugged?

  • Here is my project with your code copy pasted exactly and it's still not working.

    mediafire DOT com/?ujpmecbd4jjxx76

  • Okay, I'm whittling down the bug... it seems to not be working because the object I am calling is from another layout.

    Can someone explain to me why this is the case?

    At start of layout do I have to have the objects I am working with on this specific layout? I'm used to being able to just dump everything into an empty layout to pull from... but it's not working for start of layout?

  • Yeah, that definitely is what the bug was. I'm just curious why I've been able to load items that are stored in another layout within the event sheet, but not during the start of layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem there is that when there are no SP_001 sprites on the layout then SP_001.Width and SP_001.Height will return 0. All the sprites are being created at (0, 0).

  • The problem there is that when there are no SP_001 sprites on the layout then SP_001.Width and SP_001.Height will return 0. All the sprites are being created at (0, 0).

    Cool. That makes sense! Thank you!

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