dop2000's Forum Posts

  • Use a loop and a counter variable.

    JSON For each element in "temp_1" : Add 1 to counter

    If you change "temp_1" to an array, you could use JSON.ArraySize("temp_1") expression.

    {	
    
    "temp_1":[
    {"name":" *CHARACTER ","text":"123\n321\n231","sfx":"blipSelect (8)"},
    {"name":" *CHARACTER ","text":"ABC\nCAB","sfx":"blipSelect (1)"},
    {"name":" *CHARACTER ","text":"000\n000","sfx":"blipSelect (6)"}
    ]
    
    } 
    
    
  • it says it rescales to a size smaller than the canvas (so how is it fully obscuring to begin with)

    Not sure what you mean by that. The image is simply covered by a tilemap filled with black tiles.

    Then the tiles are erased on the tilemap at random intervals and in blocks of random size.

    For example, first r=30, so the first 30 tiles are removed. Then r=7, so tiles form 31 to 37 are removed. And so on.

    By the way, this example has nothing to do with scripting. You should've posted it in "How do I" subforum.

  • Maybe ProUI calls some method which is bugged in the latest NWJS, because this doesn't happen with other plugins and addons. Hopefully they will fix it soon.

  • You are definitely taking the right approach. But for this task I would probably recommend using JSON object. It will be easier to work with and you won't have to search the entire array when you need any bit of data.

    Here is a possible format:

    {
    "Fireball": {"mp": 5, "power": 2, "element": "fire", "type": "basic"},
    
    "Stalagmite": {"mp": 30, "power": 10, "element": "earth", "type": "attack"}
    }
    

    If you need to get the power value for the fireball for example, you can use this expression:

    JSON.Get("Fireball.power")

  • Sounds like a memory leak. Can you see Chrome memory usage increasing in Task Manager?

    Another possibility is that some object is constantly getting spawned. You can check this in debug view.

  • I had this issue for a long time, but it doesn't happen anymore in the latest versions of Chrome.

    Try updating Chrome and check out some suggestions from this post:

    construct.net/en/forum/construct-3/general-discussion-7/anyone-seeing-slower-167843

  • Should be pretty straightforward:

    + System: Every tick
    -> Player: Set Custom angle of motion to TStick.a
    -> Player: Set Custom Overall speed to TStick.d×4
    

    You can multiply TStick.d by a bigger number to go faster.

  • I've explained in as much details as I could.

    If you want, you can post your project file, mark the events you need help with and I'll tell you how to change them.

  • I suggest you study a few tutorials about arrays and expressions to get a better understanding of your own code.

    Also, refer to the official documentation.

    construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

    As you can see in the manual, chooseindex expression has nothing to do with arrays:

    You can get rid of chooseindex, it's not needed in your case.

    chooseindex(Chatposition,Dialuge_System.At(1,1),Dialuge_System.At(1,2),Dialuge_System.At(1,3))

    is the same as this:

    Dialuge_System.At(1,Chatposition+1)

    To make the code easier to read, you can save the result of that expression to a variable, let's call it res. It's up to you if you make it global or local.

    Set res to Dialuge_System.At(1,Chatposition+1)

    Then you can split the result into sentences using tokenat and tokencount expressions. Again, see the documentation about how to use them. For example, tokencount(res, "_") will return the total number of sentences. And tokenat(res, 2, "_") will return the third sentence from the res string.

    DialogueText Set Text to tokenat(res, sentenceNumber, "_")

  • Yeah, I have the same error.

    In my case it was ProUI addon that was causing it. When I remove the addon, the game works.

  • If you have developed an UI already, you can change it to work with a family of dictionaries. (add all your dictionaries to a family)

    Another option is to use JSON object instead of dictionaries. It's pretty similar, but more flexible. And you can edit it in Debug View.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try pressing F12 when you see the black screen, and check error messages in the console.

  • Ok, then see my fist comment. Wrap your expression in tokenat()

    Set text to tokenat(chooseindex(Chatposition,Dialuge_System.At(1,1),Dialuge_System.At(1,2),Dialuge_System.At(1,3)), sentenceNumber, "_")

    or the same but simpler:

    tokenat(Dialuge_System.At(1,Chatposition+1), sentenceNumber, "_")

    .

    On every key press increase sentenceNumber, from 0 to tokencount(Dialuge_System.At(1,Chatposition+1), "_")-1

  • Are you using ProUI addons in your project? They stopped working in the latest NWJS.