Problem with the position of the replica text [SOLVED]

  • #1, by red363Tuesday, 04. January, 19:26 9 months 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!

    Newbie

    81 Posts


  • #2, by esmeraldaTuesday, 04. January, 23:45 9 months 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}

    Great Poster

    459 Posts

  • #3, by red363Wednesday, 05. January, 03:17 9 months 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.

    Newbie

    81 Posts

Write post