Make a beginning of scene cutscene only play once

  • #1, by ygmantellSunday, 13. September 2015, 15:17 9 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 9 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

    440 Posts

  • #3, by afrlmeSunday, 13. September 2015, 17:38 9 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

    7278 Posts

  • #4, by AkcayKaraazmakMonday, 14. September 2015, 10:20 9 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

    440 Posts

  • #5, by afrlmeMonday, 14. September 2015, 10:29 9 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
    

    ... 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

    7278 Posts

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

    Great Poster

    440 Posts