Problem with the position of the replica text [SOLVED]

  • #1, by red363Tuesday, 04. January 2022, 19:26 2 years ago
    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 esmeraldaTuesday, 04. January 2022, 23:45 2 years ago
    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

    508 Posts

  • #3, by red363Wednesday, 05. January 2022, 03:17 2 years ago
    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