Make a beginning of scene cutscene only play once

  • #1, by ygmantellSunday, 13. September 2015, 15:17 5 years ago
    I made a cutscene to start at the beginning of a scene, however, when I go back to that scene, the cutscene plays again.
    Thanks

    Great Poster

    274 Posts


  • #2, by AkcayKaraazmakSunday, 13. September 2015, 15:49 5 years ago
    You should have a condition to control it. For example, have a condition with a name "cut_scene_con" and make it false.

    And just before cutScene_begin, write

    if condition cut_scene_con = false then
    begin cut scene
    .
    .
    .
    condition cut_scene_con = true
    end cut scene

    Great Poster

    437 Posts

  • #3, by afrlmeSunday, 13. September 2015, 17:38 5 years ago
    You should have a condition to control it. For example, have a condition with a name "cut_scene_con" and make it false.

    And just before cutScene_begin, write

    if condition cut_scene_con = false then
    begin cut scene
    .
    .
    .
    condition cut_scene_con = true
    end cut scene


    Don't forget to close the if query off with an end if action part. wink

    Imperator

    6842 Posts

  • #4, by AkcayKaraazmakMonday, 14. September 2015, 10:20 5 years ago
    Hey Lee, which one below is right mate?

    If con == true
    goto A
    else
    goto B
    end if

    OR

    If con == true
    goto A
    end if
    else
    gotoB
    end if


    --I guess first one, right?smile

    Great Poster

    437 Posts

  • #5, by afrlmeMonday, 14. September 2015, 10:29 5 years ago
    Yep the first one. But it depends as you can do additional if queries inside of other if queries.

    if x then
    ...
    if b then
    ..
    end if
    else
    ...
    end if
    1
    2
    3
    4
    5
    6
    7
    8
    9

    ... the end action part always closes off the last created if query (if, function or loop in the case of Lua) inside of the editor, so you need to think about exactly where you need to place the end if. Also there should be the same amount of end if as if action parts.

    Imperator

    6842 Posts

  • #6, by AkcayKaraazmakMonday, 14. September 2015, 11:51 5 years ago
    Cheers bro

    Great Poster

    437 Posts

Write post