blackhornet's Forum Posts

  • Select the event (not just the condition), right-click->Add->Add 'Else' (or select the event/condition and press X).

  • This is a common mistake. Don't break everything out into separate events, try to group them in a tree. The problem is when event 15 runs, you add one to Kielbasa. Then event 17 runs, sees that Keilbasa is 1 so adds another one, and again in event 18! Break the Keilbasa checks into subevents using Else, so only one gets evaluated at a time.

    On-touch

    Layer 6 visible

    Zloty>=500

    --> Keilbasa=0

    -->else

    --> Keilbasa=1

    -->else

    --> Keilbasa=2

  • One possible explanation:

    In the first case, Pick by UID knows that there can only ever be one object with that UID, so it will stop once it finds it. In the second case C2 can't know that, so it has to check every Sprite object's variable to see if the value matches or not, as there may be more than one Sprite with that value.

    It's also likely that C2 has an optimal way to pick by UIDs since it's a common operation.

  • Can you open the .caproj file?

  • A CAPX is just a renamed ZIP file. Try changing the extension to .ZIP and unzip it to look at what is inside. You can try opening it as a project then.

  • Not sure if this will help, but if you have a long operation, you need to force it to run on the next tick at least, so that the current tick can finish and any changes can be viewed. Otherwise, as you've seen, C2 does not actually finish updating things until it reaches the end of the event sheet. That's when the GUI is actually refreshed.

  • Functions run just the same as if all of that code was right where the call is made, they are not in the background. Something else must be going on.

  • Try dropbox.

  • What are your functions doing? Each will return "immediately". If you have Waits, etc, the function will still return immediately. Waits do not block.

  • Functions are called by you and execute synchronously, so if you call three functions, one after another, it would be your next action that signifies they are done. You can't put something "after" the function declarations, that just gets called like every other event.

    Maybe post what you are trying to do.

  • With a timer:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your best solution is not to use the same name in the first place - that is, when the name is used, remove it from the list.

    Here's one quick example, picking one extra index to show that all of the names were used (result is 0).

  • You use a Family with that object in it. Then you have two unique objects to work with.