dop2000's Forum Posts

  • Some expressions take multiple parameters, separated by comma. In this case rgb() requires three numbers.

    You can enter these numbers directly into the event (so called "hard-coding"), or you can use variables, or get them from the array etc.

    But you can't feed to rgb() expression a single string containing three numbers, it won't accept it.

    choose() expression is a perfectly good way to do it, however if you have lots of colors, it may become too long and difficult to edit in the future.

  • rgb() expression takes three separate values, for r, g and b color channels.

    In the event sheet you enter these values manually, for example - rgb(255, 154, 162)

    When you import colors from an json/array, you also need to receive three separate values. However in your case you put all three numbers into one field, so it became one string value "255, 154, 162"

    tokenat() allows to split this string into 3 numbers.

    Another option is to add 3 columns into your array, to store each color channel (r, g, b) in its own column. Then you could use this expression:

    rgb(bgColorArrayEditor.At(index,0), bgColorArrayEditor.At(index,1), bgColorArrayEditor.At(index,2))

  • It may be easier to store colors as hex-string, for example #00aaff

    It's easy to convert them to RGB values with a bit of JS, see event 3 in this demo:

    dropbox.com/s/87rss2d46mt13iy/ColorPickerTextbox.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here you go:

    dropbox.com/s/lipxgfm97ed6l2y/Sentence%20tutor%20one%20array2.c3p

    Note, that I moved "Set currentSentence" action into the "createSentence" function.

    Edit: also added 1px of transparent space around flags to fix the outline. Please re-download the file.

  • You don't need to use the functions, just copy actions, they are the same in C2.

  • Here is the bare minimum. If you call these functions, the game will be saved to or loaded from the specified file:

    You can learn how to open a file/folder selection dialog in the documentation:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/nw-js

  • What platform are you targeting? In NWJS export for desktops you can write data to files and read from files. In a browser game you will have to prompt user to download the file to their computer. In a mobile game this may not be possible at all.

  • It may be easier to store both translations in one file. Change its width to 2, and you can store English sentences in the first column at X=0, and Hindi in the second column at X=1

    To access any string use Array.At(languageNumber, sentenceNumber)

  • One thing you need to be aware of is the order in which multiple "On start of layout" events are triggered. For example, if in one you are incrementing CurrentLevel variable, and in another you are generating level map based on level number, you need to make sure that the events are executed in the right order.

  • Also I believe clearing just cache won't remove the local storage data. You must have cleared "site data" or "hosted app data".

  • Tilemap is a single object, you can't assign any variables to individual tiles, only to the entire tilemap.

    You can create an array with the same dimensions as the tilemap to store tile values.

    Another unconventional option is to use tile states (rotation/mirroring) as a way to store a few bits of data for every tile.

  • I understand, but I don't think there is anything else you can do.

    Try posting a suggestion, maybe it will get enough votes to be implemented:

    construct3-21h2.ideas.aha.io

  • 1) zeropad(number, 4) adds zeroes at the left up to 4 digits, for example 12 becomes 0012, or 123 becomes 0123

    2) Add "Wait for previous action" before resizing the sprite.

    3) You may need to change Array.width to Array.height in other events

    4) If currentLevel starts with 0, then the images should start with 0000.png

  • Sorry, my mistake, it's zeropad(imageNumber, 4)

    If it's still not working, please post your project file.