dop2000's Forum Posts

  • After "Wait 4 seconds" action create this sub-event:

    System Repeat 10 times
    ... Wait 0.1*loopindex
    ... Spawn projectile
    
  • I find it easier to call functions by name in scripting:

    runtime.callFunction(localVars.fName);

    or

    runtime.callFunction(localVars.fName, localVars.parameter1, localVars.parameter2,...);

  • Or do you need to arrange them differently? Post a picture of what you have in mind, or a video of a similar game.

  • Check out this demo:

    howtoconstructdemos.com/template-for-a-card-game-shuffling-a-deck-of-cards-dealing-cards-to-two-players

    It may not be exactly what you are asking, but it shows how to sort and re-arrange cards.

  • XHXIAIEIN Neat idea! You can instantly see what each trigger does, without clicking and checking its variables.

  • so, im making a drifting game and i wanna make it so when your moving, it plays a sound once, but when your speed=0, it stops, how do i do this?

    You question has nothing to do with the topic. Make a new post in How do I subforum or ask on Discord.

  • I asked ChatGPT to decipher this post:

    Yeah, I get what they’re asking. They’re making a pack-opening simulator (like for a collectible card game) and want to add a deck builder. The issue they’re facing is displaying a list of cards in a searchable way without gaps, while also making sure cards with a quantity of zero don’t appear.

    Breaking Down the Problem:

    • Listing cards for a search → They need a way to display all the cards they own.
    • Hiding cards with zero quantity → If a card isn’t owned, it shouldn’t be listed.
    • No gaps → If a card is removed, the list should shift up to keep things tidy.

    Cameron9990 Is this what you are asking?

  • but u have to take in consideration all objects in screen are rendered by canvas... even if the system is saying is "invisible" once in screen they are actually transparent, and believe it or not... rendering "transparency" uses more memory then actual colored pixels.

    No, you’re wrong. Check out this demo — make the sprite invisible, and you’ll see that GPU utilization stays 0% even with tens of thousands sprites.

    Besides, this whole thing is moot because I’m not creating 100,000 invisible objects with 100,000 variables. It’s a single sprite with about 100 variables — zero impact on performance.

    but is easy to remove a sprite by mistake once outside the screen.

    That’s why my sprite has big text saying "DO NOT DELETE" on it. Plus, I have only one instance of it in the Loader layout, which I rarely even open in the editor.

    thats why i suggest better use json, arrays, dictionary anything that its purpose is to keep number values, text values by default.

    Oh, I do. I have about 30 different JSON objects. But for frequently used values, instance variables are much more convenient.

    but considering C3/C2 is mainly used for tablets and phones, i know from past experiences sprite objects, and many instance variables on them, will glitch, like the variables will fail to be read and written.

    No, that never happens. These so-called "glitches" are always due to user error.

    especially a sprite is easy to delete by mistake, or change its designated state by simply adding it in a familly by mistake, and then "woops" the familly gets destroyed when shot

    Just like you can accidentally delete an array, dictionary, or global variable?

    These things are easily avoidable if you just pay a little attention to what you’re doing.

  • I don't think families are supported. You can report it as a bug.

  • if u have a big project, problem with it is that it might glitch

    No, it won't glitch as long as you make sure that there is only one instance of this object.

    is transparent and everytime u fetch 1 variable the gpu trying to render that sprite which uses a little bit more resources in spikes... and if u fetch consequencely 10-20-50 variables from that sprite ur game will have a spike "load freeze" on read/write data.

    I don't think this is true.

    The sprite is invisible and off-screen, so it's not consuming any GPU or CPU resources.

  • When RedUnit collides with another RedUnit, both of them become isPaused. So event 16 processes two instances of them. And because the engine is so smart, it compares each Marker UnitID with a different RedUnit instance, alternating between them (I assume). As a result, some of the markers remain unpicked.

    Add "For each RedUnit" to event #16. You might need to do the same in some other similar events.

  • I don't know if this will help, but in #16 you might need to move "Set isPaused to false" to the top of the event. Otherwise the whole event will execute several times before it stops. Avoid using "wait" actions in events that run on every tick!

    If that doesn't help, could you share your project file? It's difficult to understand what's going on by screenshots.

  • Please make a small repro and report it:

    github.com/Scirra/Construct-bugs/issues

  • There is a link to an example project in the documentation, have you seen it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't help you with the array, but there is an addon that does the same on a tilemap.

    construct.net/en/make-games/addons/252/tilemap-flood-fill

    Tilemaps are essentially 2D arrays. So you can copy array values on a tilemap, flood fill it, then copy back to the array. Since this is for a jam, it could be a quick and easy solution.