Cut scenes

Started by The Almighty Metroid, Thu 16/10/2008 18:15:06

Previous topic - Next topic

The Almighty Metroid

ok it's me again...

How do I Make the cutscene happen after they chose 1 of the 3 dialog choices? I wanted for
SCREAM AND RUN she changes speed and runs then dies. I wanted for ATTACK to shoot and you die. I wanted for BACK OFF SLOWLY AND RETURN TO SHIP for you to back off and
run through the next room.
thanks 8)
Metroid
Who is more foolish? The fool, or the fool that follows him?

Ghost

Once again, the run-script command is your friend. Just call it from the dialog line that activates the scene. You may want to disable "say" for that line maybe, since you are writing "actions" instead of sentences.

The Almighty Metroid

ok but i just need to know how to get the cutscene after dialog choice how would i run a script for each choice ???
Who is more foolish? The fool, or the fool that follows him?

Matti

Quote from: Ghost on Thu 16/10/2008 18:21:04
Once again, the run-script command is your friend.

Just look it up in the manual.

The Almighty Metroid

ok noone is really helping...
I JUST NEED A SCRIPT.

(BY THE WAY I DID CHECK THE MANUAL.)
Who is more foolish? The fool, or the fool that follows him?

Akatosh

Obviously not. It's explained in the tutorial, which you should complete first.

abstauber

Quoterun-script X
Runs global script function "dialog_request", with X passed as the single parameter. This allows you to do more advanced things in a dialog that are not supported as part of the dialog script. The "dialog_request" function should be placed in your game's global script file, as follows:

 function dialog_request (int xvalue) {
   if (xvalue == 1) {
    // your code here
   }
   else if (xvalue == 2) {
    // other code here
   }
 }


What the manual wants to tell you is, that you need the function dialog_request in your GlobalScript.asc.
So just copy and paste this function the end of your game script. and add the code.

In the dialogs, you use these function with run-script, as ghost already told you.


Here's a sample dialog:
@S
Metroid: How works run-script?
Matti: Look it up.
return
@1 // You've chosen: Control you emotions and be nice
run-script 1
stop
@2 // You've chosen: Freak out and hope someone still helps
run-script 2
stop

Here's the sample function

function dialog_request (int xvalue) {
   if (xvalue == 1) {
    // be nice (this is a comment btw.
      cMetroid.Say ("Thank you, I'll look again");
      cMetroid.Looksthingsup();
   }
   else if (xvalue == 2) {
    // not beeing nice
     cMetroid.CapsLock();
     cMetroid.Say ("i just need a script."):
     cMetroid.Kick (eScreenInFront);
     cMetroid.ChangeRoom(6,6,6);
   }
}

Something like that will do  ;D

The Almighty Metroid

#7
.
Who is more foolish? The fool, or the fool that follows him?

The Almighty Metroid

#8
so is this right?

dialog:
// Dialog script file
@S  // Dialog startup entry point
Samus: What to do?
return
@1
run-script 1
stop
@2
run-script 2
stop
@3
run-script 3
stop


Script:
function hHotspot1_Look()
{
Display(" oh my gosh... an omega Metroid...");
dOmega.Start();
}
function dialog_request(int xvalue){
   if (xvalue == 1){
     StartCutscene (eSkipESCOnly);
     cSamus.Walk(198, 148, eBlock);
     Display("The metroid scoops you up and eats you.");
     cSamus.ChangeRoom(6, 300, 175);
     EndCutscene();
   }
   else if (xvalue == 2){
     StartCutscene (eSkipESCOnly);
     cSamus.Walk(198, 148, eBlock);
     Display("The metroid scoops you up and eats you.");
     cSamus.ChangeRoom(6, 300, 175);
     EndCutscene();
   }
   else if (xvalue == 3){
     StartCutscene (eSkipESCOnly);
     cSamus.Walk(318, 171, eBlock);
     Display("Your the one that got away. You got back to your ship and live to tell the tale");
     cSamus.ChangeRoom(7, 7, 160);
     EndCutscene();
   }
  }   

is that right????
Who is more foolish? The fool, or the fool that follows him?

TwinMoon

Quote from: The Almighty Metroid on Thu 16/10/2008 21:01:30
is that right????

Dunno. Does it work?

(put the dialog request bit in the global script, btw)

abstauber

Quote from: The Almighty Metroid on Thu 16/10/2008 21:01:30
function hHotspot1_Look()
{
Display(" oh my gosh... an omega Metroid...");
dOmega.Start();
}
....

[parrot]global script, global script, braawk[/parrot]

Seriously, there's only this one function for the whole game. So you'd better keep tracks of the numbers  ;)

Khris

And, if you're going to call exactly the same code after option 1 and 2, you don't need to put it in there twice, just call "run-script 1" for both dialog choices.

SMF spam blocked by CleanTalk