Menu
Login
Language
DE EN FR ES IT CZ
Back

Problem with the position of the replica text [SOLVED]

  • #1, by red363 Tuesday, 04. January 2022, 19:26 4 years ago Quote
    Hello everyone!

    I use a script that forces the text of the replicas to be strictly in certain coordinates. Faced a problem in a scene that exceeds the size of the exposed resolution. Those. during scrolling, when the character moves to the back of the scene, all his lines are left somewhere behind (since they are tied to certain coordinates).

    Please tell me if there is any solution to this problem?
    Thanks!

    Forum Fan

    101 Posts

  • #2, by esmeralda Tuesday, 04. January 2022, 23:45 4 years ago Quote
    I don't know what your script looks like, but I guess you need to add the scroll position.

    In the line where you set the position add: + game.ScrollPostion.x  and if the game is scrolling vertically too, the same with .y

    like this for example:
    text.Position = {x = game.ScrollPosition.x + (game.WindowResolution.x /2), y = game.ScrollPosition.y + 100}

    Key Killer

    567 Posts

  • #3, by red363 Wednesday, 05. January 2022, 03:17 4 years ago Quote
    I don't know what your script looks like, but I guess you need to add the scroll position.

    In the line where you set the position add: + game.ScrollPostion.x  and if the game is scrolling vertically too, the same with .y

    like this for example:
    text.Position = {x = game.ScrollPosition.x + (game.WindowResolution.x /2), y = game.ScrollPosition.y + 100}
    Thank you very much, esmeralda! It works.

    Forum Fan

    101 Posts