0 Favourites

Object not responding after creation.

  • I know there's an issue with objects not being recognised immediately after they've been created if on the same event-level (the bane of my C2 life), but this appears to be something else.

    I need several listboxes. I'm creating 2 and giving them a variable 'Number' to identify them. I then try to identify each and add an item. The first isn't recognised and doesn't respond, but the second does. They're both one sub-level below the creation and on the same level. Is this a C2 thing that I don't know about, or am I doing something very silly? I've attached the code below, have stripped it of everything except the basics. Listbox0 here doesn't respond (if I put a sound in that section it doesn't trigger for example).

  • Have you tried a 'wait 0' after the Create object? Or maybe use an 'on created' event to do the init.

  • That might work I guess, though looking at that code, it makes no sense. If one listbox works, the other should, or neither. In the end I ripped this part out and rewrote it differently, so I've got it to work another way now anyway.

    Thanks.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I think C2 will reference only the last List that was created - it has no way of referencing the first one. Try adding a pre-condition Pick All and then put the list box number checks as sub-events (the Pick All can still be a sub-event of the main one you have in your image).

  • Ah yes, I wasn't aware of that. After creating 2, it'll only have one selected, so to speak? So a pickall should fix it... well I've changed it now, but good to know

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