dop2000's Forum Posts

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

  • You need to post an example of your array! I know what token is, I don't know how are you using it in your project.

  • What do you mean by "11 tokenats", "28 tokenats"?

    You should probably post your project or some screenshots of your array and the result you want to achieve.

  • You can try Set layout scale to 2

    But I don't recommend that. Perhaps reduce the viewport size in project properties?

  • Do you want to split the result of that expression?

    tokenat(chooseindex(...), index, separator)

    Or save it to a variable first, and then use tokenat on the variable.

    tokenat(result, index, separator)

  • ProUI addon doesn't work with NWJS v77

    The exported application shows black screen and this error in console log:

    [C3 runtime] Failed to load all engine scripts in worker: TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
     at LoadScripts (workermain.js:2:258)
     at InitRuntime (workermain.js:5:264)
     at HandleInitRuntimeMessage (workermain.js:1:151)
    

    It works when exported using previous versions - 76, 75, 71 etc.

    Is this something that can be fixed?

  • Instead of Set JSON.Current key to 1 try this:

    Set "." to 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • 1. Use the Debug View (Shift+F4) to find what's causing bad performance. Things to look for:

    • excessive number of object instances
    • too many collision/poly checks - over 1000 per tick
    • memory used by images - over 1GB
    • high CPU or GPU utilization, check CPU/GPU profiler tabs for details

    2. All behaviors are already using delta time. If you move objects with events, you must use dt. For example, Move 5*60*dt

  • MoveTo behavior has MovingAngle expression. Use System conditions like "Is within angle", "Is between angles" to compare it.

    For example:

    Enemy.MoveTo.MovingAngle is within 45 degrees of 270

    This means it's moving up.