dop2000's Forum Posts

  • Use Text.TextWidth and Text.TextHeight expressions. Check out this demo:

    howtoconstructdemos.com/auto-resizing-speech-bubble-for-dialog-systems-capx

  • After the "Create" action, MenuItem object refers to the created instance, not the one picked in the first loop.

    So if you need to copy some settings from that instance into the newly created one, there are two methods:

    1. Use a family. Add MenuItem to a family, and then you can do things like "MenuItem Set Items to MenuItemFamily.Items"

    2. Use local variables for temporarily storing and copying the values:

    Local variable tmpItems
    
    For each MenuItem
     set tmpItems to MenuItem.Items
     Create MenuItem
     MenuItem set Items to tmpItems
    
  • Yeah, I tried newline, <br> tag, "\n" and a few methods from this page - none of them worked.

  • You can change List type to "Listbox", resize it to full size and set invisible. When the button is clicked - make it visible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I made a sprite font for you:

    dropbox.com/s/n4cxp1mfcbsy678/1999Carolina_SF.c3p

  • Have you tried "NWJS Run" action?

  • I was asking why the total of loops ran isn't the same in 'len(s) to 3' and '3 to len(s)'.

    It is the same! In both cases with 100 characters in the string, the loop will run 98 times.

    But if you start the loop from 3 to 100, at the end of the loop your loopindex will be at position 100, however the string will already be 130 characters long (because you've added ~30 spaces to it). So the remaining 30 characters at the end of the string will be left unprocessed.

  • You can run commands in NWJS. Not sure about sudo, but things like this work in windows:

    NWJS Run "start dir"

    This will open a CMD window and execute dir command in it.

  • With 8-direction it's a bit more difficult. You can move the character slightly up or down by directly changing its Y coordinate on every tick, for example:

    Character overlapping Vessel
     Character set Y to self.Y-20*dt
    

    However, this can mess with collision detection in 8-direction behavior. If there are solid walls or corners, your character may get stuck or shake.

    The proper way of doing this is by using 8-direction actions - "Set max speed" or "Set Y vector". For example, when the character moves in the direction of the water flow, you need to increase behavior max speed. When it moved against it, decrease the max speed.

  • I've explained this earlier:

    If your string is 100 characters long, and you start from 3 to 100, by the time you reach 100th character, the string will be around 130 characters long, because you are adding spaces after every 3rd character. So the loop will stop at 100 and the remaining portion (30 last characters) of the string will not be processed.

    If you run your loop in reverse, you avoid this issue.

    .

    Another option would be using a While loop, it will run until the full string is processed, even if it grows or shrinks:

    Local variable i=0
    While i<len(s)
    .....(process the string)
    .....Add 1 to i
    
  • Yep, ligatures work with "1999 Carolina" font.

    Can you use another version of this font without the ligatures? Or you can convert it to SpriteFont. I use this tool to easily make sprite fonts:

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

  • I think 4K will be an overkill for a mobile game. Full HD or 2K will look almost just as good, but will use much less space and memory.

    For PC you can choose 4K, as PCs are more powerful.

    Having graphics for two different resolutions in one game is also not a good idea. You should pick one resolution that is optimal in quality, size and performance.

  • I tried a font with ligatures, and they don't work in Construct, at least for me..

  • You can't do this. CSS only works with Form Control objects (Button, Text Input etc.)

    You can use BBcode with Text objects.

  • Not sure what you mean.. If you set A=5 and B=20, then "For A to B" loop will only run from 5 to 20, no matter if you change these variables inside of the loop.