Aller au contenu

Photo

Script for making two cutscenes play consecutively


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
DahliaLynn

DahliaLynn
  • Members
  • 1 387 messages
I am not a scripting person in the least, but I have managed to get resources to have a script make a cutscene play
(along with plot and dlg taken into account)

My question :
I would like two cutscenes to play one after the other, seamlessly, and *before* the slideshow plays.

My current relevant script is as such:


     case MY_MAIN:
                {

                    EquipItem(oPC, oChestArmour);

                    CS_LoadCutscene(R"first_cutscene.cut",PLT_EPIPT_MAIN, EPI_JUMP_TO_SLIDE_SHOW);

                    break;
                }


        }
    }
any ideas? All help would be appreciated!

Modifié par DahliaLynn, 31 août 2010 - 09:42 .


#2
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages
Create a script to play the second cutscene and add it to the End Script property of your first cutscene.

and *before* the slideshow plays


Ups, sorry, I missed that part.

Modifié par _L_o_B_o_, 31 août 2010 - 10:10 .


#3
FergusM

FergusM
  • Members
  • 460 messages
If you open up the cutscene editor, you will see it has a field called 'end script.' I think what you want to do is take your current cutscene call and change it to simply

CS_LoadCutscene(R"first_cutscene.cut");

Then you want to change that cutscene's endscript to:

void main()
{
CS_LoadCutscene(R"second_cutscene.cut",PLT_EPIPT_MAIN, EPI_JUMP_TO_SLIDE_SHOW);
}

If the endscript for the first cutscene was already something other than the generic one, you'll probably want to move that to the endscript of the second cutscene.

Modifié par FergusM, 31 août 2010 - 10:14 .


#4
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages

CS_LoadCutscene(R"second_cutscene.cut",PLT_EPIPT_MAIN, EPI_JUMP_TO_SLIDE_SHOW);


I'm just curious. What are that plot and flag used for? (EPIPT_MAIN and EPI_JUMP_TO_SLIDE_SHOW)

Modifié par _L_o_B_o_, 31 août 2010 - 10:22 .


#5
DahliaLynn

DahliaLynn
  • Members
  • 1 387 messages

FergusM wrote...

If you open up the cutscene editor, you will see it has a field called 'end script.' I think what you want to do is take your current cutscene call and change it to simply

CS_LoadCutscene(R"first_cutscene.cut");

Then you want to change that cutscene's endscript to:

void main()
{
CS_LoadCutscene(R"second_cutscene.cut",PLT_EPIPT_MAIN, EPI_JUMP_TO_SLIDE_SHOW);
}

If the endscript for the first cutscene was already something other than the generic one, you'll probably want to move that to the endscript of the second cutscene.


Thank you ! this looks like a very sound idea. In trying to create a new script (and I realize this is rudimentary but please bear with me)
I am getting compiling errors when saving the new "void main" script ...and another person using the same script doesnt get those errors. I even tried copying and pasting her version. For some reason it fails to recognize "CS_LoadCutscene"
Would anyone know why this would happen? Do I need to define this anywhere?

void main()
{
CS_LoadCutscene(R"second_cutscene.cut",PLT_EPIPT_MAIN, EPI_JUMP_TO_SLIDE_SHOW);
}

I: 02:23:46 - Compile failed
E: 02:23:46 - alistair_scene_two.nss - alistair_scene_two.nss(3): Undefined identifier (CS_LoadCutscene)


Lobo: those plots and flags are for the end of game slideshow, which determine what slides be used.The flags have been determined throughout entire game play I believe (but am not sure)

Modifié par DahliaLynn, 01 septembre 2010 - 12:11 .


#6
FergusM

FergusM
  • Members
  • 460 messages
Ah, sorry, you need to include another script file which contains CS_LoadCutscene.



I believe it would be (put this at the top of the script)



#include "wrappers_h"



I believe it is in there. If that doesn't work, go to somewhere cs_loadcutscene does work, right click on the text (i.e. on cs_loadcutscene itself in the script) and hit 'go to definition,' it will open up the file where this function is defined, include that instead.

#7
DahliaLynn

DahliaLynn
  • Members
  • 1 387 messages
Thank you FergusM. I did that, and found that the include utility was the one for CSLoadCutscene. Then of course the next available error came up, so in order to limit an endless chase, I decided to cut and paste all the non plot includes in the other cutscene calling script I had, and it finally compiled ---and worked! :D Thank you ever so much for your help !