dop2000's Recent Forum Activity

  • 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

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 18 Oct, 2026

Twitter
dop2000 has 280 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies