Asmodean's Forum Posts

  • You could also convert the whole string:

    -> System: Set myString to """This is a \t tab"""

    -> Text: Set text to Browser.ExecJS("String("&myString&")")

    or direct:

    -> Text: Set text to Browser.ExecJS("String(""This is a \t tab"")")

  • now I unterstand what you want. Look of this works for you

    | Global number year‎ = 0

    | Global number month‎ = 0

    | Global number day‎ = 0

    | Global number myUnixtime‎ =0

    | Global string DateV‎ = "2018.4.29"

    | Global number daysToAdd‎ = 21

    + System: On start of layout

    -> System: Set myUnixtime to Browser.ExecJS("Date.parse("&DateV&")")

    -> System: Set myUnixtime to myUnixtime+daysToAdd×86400000

    -> Browser: Execute javascript "this.myDate = new Date("&myUnixtime&")"

    -> System: Set day to Browser.ExecJS("this.myDate.getDate()")

    -> System: Set month to Browser.ExecJS("this.myDate.getMonth()")+1

    -> System: Set year to Browser.ExecJS("this.myDate.getFullYear()")

    -> Text: Set text to year&"."&month&"."&day

  • I 'am sorry I don't really understand what you are doing, but if you want convert Unixtime to a normal format this should be easier:

    -> Browser: Execute javascript "this.date = new Date("&unixtime&");"

    -> System: Set month to Browser.ExecJS("this.date.getMonth()")

    -> System: Set day to Browser.ExecJS("this.date.getDate()")

    -> System: Set year to Browser.ExecJS("this.date.getFullYear()")

    -> Text: Set text to year&"."&month+1&"."&day

  • Try this:

    https://drive.google.com/file/d/1jhmNoGaR65z6fit4Y-_Q-ruIJFR0nHYW/view?usp=sharing

    The other one is a direct download. No clue why it's not working.

  • WRS

    I would rather use the Anchor-behavior.

    I made a little example maybe it's helpful for you. You can test different resolutions with the "device toolbar" if you press F12 in your preview in FF or Chrome.

    https://drive.google.com/uc?export=download&id=1jhmNoGaR65z6fit4Y-_Q-ruIJFR0nHYW

  • Ashley made a tutorial about resolution and aspect ratio.

    construct.net/en/tutorials/supporting-multiple-screen-17

  • I build the apk with Cordova CLI. I don't know if it's really helpful. I assume you used the build service from Scirra? I think it should be an apk from their build service.

    However here is my apk:

    drive.google.com/uc

    It's only a Textbox without any events.

  • I can reproduce with only a TextInput.

    It looks looks like there is a problem with old? cordova status bar plugins. stackoverflow.com/questions/36156357/cordova-status-bar-plugin-doesnt-work-in-android-when-keyboard-pops-up

    I think you should make a bug report.

  • It makes sense, you can deactivate groups. If you have a global variable in this group, it would break your game.

    For the organization of your variables I can not really help. I try to avoid global variables if it's possible and use instance, family variables and local variables instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like it's something missing. I would ask MadSpy orAJ2DI.

    Be aware that if you use a newer NWjs version for an update of your game, all people that bought it on Steam can also get trouble with the NWjs-profile. They have to delete the folder, or you rename the project or you handle it yourself with a batch-file or something like that. Maybe TheRealDannyyy has an idea about that.

  • The game will still not launch (not even a black screen, just nothing at all).

    Try to delete the folder in \AppData\Local\ again. Restart your Computer and export your game again in a complete new folder don't export it in an old one.

    If you get at least a black screen again, try to press F12 for the develop tools, choose the tab 'console' and look if you have any errors.

  • Look for a folder with your game name in \Users\<your_user_name>\AppData\Local\ and delete it (or rename it). That should be the profile of the game.

  • 409 pixels? I usually do not go over HD 1920 x 1080 for backgroundsprites, and someties it has to be that, you cannot tile these things.

    I think that is a typo and means 4096. 4096X4096 is the maximum texture size in OpenGL ES 2.0

  • I'm trying to find an action to load a string from a file and can't find it... I can load an entire dictionary or array, but I need to load this same string from a file, not the string in an array or a dictionary.

    I depends where the file is. If your file is imported in the project you need ajax to load it. Is the file on a server you need ajax an a php script. If you want the user to load the file from their Computer you need the file chooser plugin.

    But be aware that the Tilemap-Plugin has Load in the JSON-Group and "Set from JSON" in Misc, because there are two different JSON Expressions: Tilemap.TilesJSON and Tilemap.AsJSON.

    AsJSON expression returns the entire object state (including position, size, behaviors etc), whereas TilesJSON returns only the tile data.

  • The first problem is that quotation marks tells where a string start and ends. So if you have quotation marks in your string, there is no way for Construct to say if this now ends or starts a string or if this a normal character. You need an escape character for this that tells construct the handle the next character as an ordinary character. In Construct it is again a quotation mark, that means if you want a quotation mark in you string you have to make two of them "".

    Your Tilemap String should look like that:

    "{""c2"":true,""w"":{""x"":0,""y"":0,""w"":640,""h"":480,""l"":9381438636563842,""zi"":0,""hX"":0,""hY"":0},""data"":{""w"":20,""h"":15,""d"":""21x9,0,3x1,2,2x9,12,8x9,15,3x9,3,2x4,17,5,5x9,0,7x1,2,9,3,16,2x4,5,5x9,3,6x4,16,5,9,3,3x4,5,4x9,15,3,4x4,10,7,11,5,9,6,3x7,8,5x9,3,2x4,17,4,5,9,3,5,5x9,2x-1,9,15,2x9,3,4x4,13,1,14,5,3x9,0,1,7x-1,7x7,8,9,15,9,3,2x-1,2x4,-1,5,9,5x-1,2x9,15,4x9,3,-1,4x4,3x-1,1,2x-1,3x1,2,4x9,3,-1,3x4,16,5,9,3x-1,4,16,2x4,5,4x9,3,9x-1,5x4,5,4x9,3,4,17,3x4,5,9,3,2x-1,2x4,17,4,5,4x9,6,5x7,8,9,3,4,17,4x4,5,8x9,15,3x9,6,6x7,8,9""}}"

    You can use notepad for example to replace " to "".

    Another way is you put the string you got from toJSON to a string variable and use this variable in set from JSON string, then without quotation marks on the beginning and the end for a string.

    Your second problem is that you confuse download with load. Download is like from any website that you save something from the web to your PC. What you want is Load.