dop2000's Forum Posts

  • There are other options:

    You can use a While loop - generate a random frame number, check if there is a button already with this frame. And either repeat or stop the loop.

    Or put all numbers into an array, pick random index and then delete it.

    Or use a string variable with the list of frames - pick random token and delete it.

    But permutation table is easier than any of those.

  • You can also do this without the AdvancedRandom. Add 20 button instances with frames from 0 to 19. Pick the correct one. Pick 4 other random instances, destroy the rest.

  • Create an AdvancedRandom permutation table. For each button set frame to AdvancedRandom.Permutation(loopindex)

    If you need to exclude the correct frame from the table, use a variable instead of loopindex. And skip one entry in the table if it equals the correct frame.

    For Each Button
    .. If AdvancedRandom.Permutation(i)=correct : Add 1 to i
    
    .. Button set frame to AdvancedRandom.Permutation(i)
    .. Add 1 to i
    
  • Try JSON.Get(".nome")

    The "." period should always be used for relative paths.

  • I have the code, but it does nothing. Debugging reveals that when I click on the object, it says that the inspected item is destroyed when it's not destroyed. Which makes me think it's destroying and creating on the same frame.

    That's probably what happens.

    In addition to Debug Mode, use browser logging.

    Add "Browser Log" action to the event where items are created and destroyed. In preview press F12 and open console - you will see how often they are created/destroyed.

  • Save the selected character in a global variable. In the new layout - use the value in the variable to spawn the character object or set the right animation.

  • Jump-thru behavior is pretty buggy. Try making these platforms thicker. If it doesn't help, you might need to add some events that will check if the character is stuck inside the platform and temporarily disable the behavior to "un-stuck" it.

  • You need to store these messages somewhere - in and array, dictionary or JSON.

    Then you generate and display the list of messages from the array. If any message is deleted, you can simple re-generate the list.

    Here is a simple example of a scrollable list:

    howtoconstructdemos.com/scrolling-a-list-of-players-scores-images-etc-example-a-capx

  • Any idea how to release it on Play Store as I have heard that maximum size permitted on play store is 100 MB

    It should be 200 MB now, and that's download size:

    If your AAB is 150 MB, I imagine the download size will be even less.

    But you can reduce the size of exported game by compressing images with lossy compressor. I used pngquant:

    pngquant.org

  • Add a second condition to the event:

    System compare two values: Array.indexOf("cow")<0

  • You can use a single 1D array and just think of it as a 2D array :)

    Make an array with width=256 and use it to store 16x16 values. If you need an entry, say, for (X=5,Y=1), it's Array.At(1*16+5)

    Or Array.At(Y*16+X)

    Then you can easily remove entries in the middle and shift the rest of the array using "pop" action.

  • Interestingly, Dictionary.Get(Dictionary.CurrentKey)) returns an empty string, as it's supposed to be.

    Also, this doesn't happen with arrays. Array.CurrentValue works correctly with empty values.

    I would say this is a bug, you need to report it!

    github.com/Scirra/Construct-bugs/issues

  • Yeah, see this post:

    construct.net/en/forum/construct-3/general-discussion-7/json-data-types-182020

    It's weird that Scirra devs who are always so cautious about backward compatibility, have made this change, which can potentially break many old projects.

  • If you add more frames, the animation may run slow at low framerates. Say, if you make it 60 frames per second, but the game runs at 30 fps, the animation will play at 50% speed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Does this happen if you copy the tilemap to a blank project?

    Maybe some setting is slightly off on the tilemap or the layer with the tilemap - like z-elevation or angle is not zero. Or you changing the layer scale.