RBuster's Forum Posts

  • Actually I have symbolsP1, symbolsP2, ... symbolsP4, and each symbol may be displaying a different frame, according to what I want each one to show.

    I will also have several boxes (which is the container spawned) on the screen, that is, each one with a different ID and I need to control each of the frames of the labels that are inside these containers, which will show different frames.

    e.g.

    box.id=1 : label1 = frame 1 / label 2 = frame 3...

    box.id=2: label1 = frame 4 / label 2 = frame 1...

  • I created a container of a box and included 3 sprites with 3 frames each, which would be the labels that would appear on the box. I intend to create 3 boxes and each one will show different labels as I determine in the code. Each box will have an ID variable that will be assigned at the time of creation. I need to know how to control the frames of each box individually using this ID.

    I tried this code, but it didn't work:

    + System: Pick BoxP where BoxP.id = 1

    + SymbolsP1: Is overlapping BoxP

    -> SymbolsP1: Set animation frame to 2

  • Thank you!

  • Hi

    I need to create a system which shows a code made up of letters and after a few seconds they become asterisks and the user has to type the same code that changes from asterisk to key pressed. There is also the possibility for the user to go backwards, erasing each letter typed.

    I'd need to know how can I do to replace the letters by asterisks (one by one with one second apart) once shown, and how to replace the asterisks by letters as the user types and letters by asterisks as the user backtracks what was typed.

    Thanks in advance.

  • Thank you R0J0hound and Fib

    I will check the better solution based on what you both suggested.

  • I want to create a system that creates groups of letters, drawn randomly and that don't repeat themselves. There would be 5 groups with 10 variations each and with different amounts, for example: the first would have 10 variations with the amount of one letter, the second would have 10 variations, each with 2 different letters and combinations that do not repeat (a,c/a,d/b,g/...) and so on until group 5.

    Is there any way of doing this more simply than using arrays?

  • Ok. Thanks for all the suggestions.

  • I have an old version of a C2 game that used crawberry developer plugins (phonegapIAP and ScreenOrientationPortrait) and I need to update this file in Construct 3 anyway, but I can't install these addons anymore and as a result I can't open the project in the editor. What would be the solution to this problem? Thanks.

  • Thanks for answering.

    Ok. I decided to use only one array for all levels. Normally I use localstorage to save/load the information, but as I only want the information to be available while the game is open, I was wondering if I could generate a JSON file with this information (a JSON file for each bidimensional array) and load it only if the player returns to the levels they have already passed to show different data. It seems to be a leaner solution but I don't know exactly how to do this. Would this be similar to what I usually do with localstorage?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to make an educational game about the 4 math operations and I'm trying to figure out the best way to do it. The game will show a result and the player needs to select the number options below as many as necessary, according to the mathematical operator being displayed,. For example: operator: sum / result: 10 / alternatives to be selected: 5, 3, 2, 1 and 4. In this case, the player could select 5, 4 and 1 or 5, 3 and 2

    My solution, which is certainly not the best, would be to create a two-dimensional array for the 5 levels for each operator, to store a result and its respective alternatives/options, then use another array to randomize and delete the options each time they are displayed on the screen so that they don't repeat.

    Is there a better solution? For example, one in which the system itself automatically creates a random result and also the alternatives for each result withou repetions? If not and I will really have to define all the results and alternatives, the way I intend to do this would be the best way to shuffle and avoid repeating the exercises?

    I am looking for ideas/suggestions.

  • I've been checking out the demo file that dop2000 shared and I've made changes to my code based on that example. The score is showing the results when it is registered (1st time score panel is open), but when I load the game again, the score is no longer there, just the dates.

    EDITED: I believe I already found the problem and it seems that the score is behaving correctly.

  • When LS works on one device/browser and doesn't work on another - this is a clear indication that it's not used correctly.

    Also, saving each element of the array in a separate key is woefully inefficient. You can save or load the entire array as JSON with a single action.

    I've always done it this way, because I couldn't do it any other way. I've already read about the option of using json, even before you posted I was checking a tutorial that you indicated in another post (https://howtoconstructdemos.com/easily-save-multiple-values-in-local-storage/), but I can't imagine, for example, how to use this type of solution to display the latest 5 registers. Can you talk about it or give me some instructions?

  • Jase00

    Thanks for answering. In fact, I placed these triggers later, trying to force the registration. I know they're wrong, but I was trying everything I could. I have already removed them.

    Now I noticed that the record appears in the score, but instead of appearing at the same moment when opening the menu layout, as happens in Firefox, I have to refresh the game page (or close and open the browser again) and then the points record appears in the second line of the score, with the top line having zeros. My question is: why can't I display the score immediately in other browsers, but only in Firefox and why does it appear on the second line?

  • I have two layouts (menu/game) and point recording takes place in the game layout. Then, when the game ends, the system opens the menu layout and, if a boolean is true, it register the date, amount of variable points e level, and then shows the score. I am having to restart layout otherwise the score will not update

    This works perfectly on Firefox, but when I tested it on Edge, Safari and Chrome, the score is always zero.

    Could this be due to some incompatibility of local Storage with other browsers? If it works perfectly for Firefox, could there still be an error in the code?

    Thanks

  • I often use this trick:

    > Object on screen : // nothing in this event
    
    Else : // your actions here
    

    Thanks. I will give it a try.

    EDITED:

    dop2000

    That worked. Thank you very much.