dop2000's Forum Posts

  • If you are asking how to overwrite JSON file in the project in runtime - this is not possible.

    You need to save changed data to Local Storage.

    On start of the game check if the data in Local Storage exists. If it does - load from Local Storage. If it doesn't exist - load from JSON file.

  • You can try fixing it yourself - rename the project to ZIP and extract all files. Edit (Player events).xml using Notepad++ or a similar tool.

    Scroll to line 111751 and you will see that the xml formatting is broken there.

    I tried removing the entire event block. The project loads, but then Construct 2 editor crashes as soon as I try to click anything.

    I was actually able to open the project (after those edits) in Construct 3. I strongly suggest you switch to Construct 3 - it's much more advanced and stable than C2, and you will be able to receive support if anything like this happens to your project again.

    And of course, with the project this big you need to set up automatic back-ups!

  • I agree that your suggestion is useful, but I don't think it will be implemented any time soon.

    Not having to spend wasted time having to load and manually set each font, which at this point is numbering 30+, in editor, hard setting properties for each one,

    But you'll still have to spend as much time (if not more) adding images and settings of all fonts into the array.

    then in code, spawning potentially 30+ text boxes for each separate element of text

    My idea was that you continue developing your game with just one default spritefont object (English). And you can add 30+ spritefont objects for other languages to a separate repository layout. In runtime, if the selected language is not English, you replace the default spritefont, spawning another spritefont in its place, and copying text/size/color and all other properties to it. You will only need one "EnglishSpritefont On Created" event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It seems brutally inefficient to have to add extra SpriteFonts for every language/alphabet

    Even with the modified plugin, you will still have to add and manage images, character sets and spacing data for each language. In my opinion it's not much different from adding multiple SpriteFont objects to your project.

    You can create a simple system which will automatically swap English spritefont for a spritefont in another language in runtime.

  • You will need to change not just the image and character set, but also spacing data, and possibly some other parameters like line height.

    Having multiple SpriteFont objects seems like an easier solution for me. You can add them to a family and create the appropriate object for current language by name.

  • If you don't need to send the url, have you tried setting it to an empty string "" ?

  • I'd like to try making a duplicate Spritefont plugin

    Scirra wanted to prevent people making duplicates of the official plugins and made them difficult to find in C3.

    What functionality are you missing in Spritefont that you want to mod it?

  • Your second event "Touch Is not touching Roll_Double" is triggered even when you hold the key on keyboard, and it resets the volume. You need to add another condition to it - "Key RAC_ROLL_DOUBLE is not down"

  • Instead of creating a new arrow every time, you can just put one arrow instance on layout and set its position to the clicked sprite.

  • You do not have permission to view this post

  • I think permutation table is the easiest way to do this.

  • That would be really helpful to learn javascript;)

    It won't. When you export your game, it's converted to JS, but the code is not easy to read or understand.

    Check out this series of tutorials by Ashley instead:

    construct.net/en/courses/learn-javascript-construct-79

  • You need to use the Desktop version of C3 to preview/debug NWJS projects:

    construct.net/en/forum/construct-3/general-discussion-7/construct-nw-js-desktop-app-131317

  • Everything looks good to me. Maybe you are right and it is a bug specific to iOS..

    I would make a small project just to test that "On item exist" event is really not triggered and log a bug report.

  • In the last line on your screenshot you are saving "Coins" string, instead of Coins variable. That's why it's NaN, because the string can't be converted to a number.

    You need to remove the quotation marks.