Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

[Resolved] End cutscene when camera stoped scrolling

  • #1, de nicolas-dekaise h 2 years ago Zitieren
    Hello,

    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
  • #2, de esmeralda h 2 years ago Zitieren
    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. 
    https://wiki.visionaire-tracker.net/wiki/Check_For_Scene_Scr...

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

  • #3, de nicolas-dekaise h 2 years ago Zitieren
    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