[Resolved] End cutscene when camera stoped scrolling

  • #1, by nicolas-dekaiseTuesday, 27. February, 12:02 A month ago

    I'm trying to make a cutscene where the camera slowly span from one point to another while text narration text is displayed.
    But as soon as the narration text is finished, the cutscene end and the player can move the main character.
    Is there a way to do it easily without telling the script to wait for x seconds, something like "wait for the camera to reach that point" ?

    Thanks in advance for your help smile


    7 Posts

  • #2, by esmeraldaTuesday, 27. February, 13:34 A month ago
    There is no action part to check if the scolling is finished. The engine starts the scrolling and immediately processes the next action part.

    Adding a pause as long as the scrolling takes is indeed the easiest solution.

    You could also check with an script if the scene is scrolling. 

    Or use the if lua result action part to check if a position is reached.

    Key Killer

    513 Posts

  • #3, by nicolas-dekaiseTuesday, 27. February, 16:12 A month ago
    Thanks for your answer, I found another solution, the target position x is zero so I've created a value "rentCameraX" set to 10000 at start, then update all the time it with the camera position :

    Values["currentCameraX"] = game.ScrollPosition.x

    After that a simple if currentCameraX > 0 -> jump to the prev action

    Not perfect, but it works without calculating how much time the camera pan will take for each cutscene smile


    7 Posts

Write post