A cutscene.[Solved]

Started by Goldie, Sun 01/03/2009 21:11:17

Previous topic - Next topic

Goldie

I read the tutorial but I still don't understand how I would make this happen. My character enters the room where his village is but finds it burned down. I want to make my villian walk towards my character and scream, " HAHAHAHAHAHAHAHAHAHAHAHAHAHAHA!" and then run away. How would I do this.
Jesus said,"Take up your cross and follow me.You will be persecuted."/        I did.

Joe

#1
I'll give you a shot:

Code: ags


    //after player has entered that room
    StartCutscene(eSkipESCOnly);//if you wat to make this scene skippable
    
    cVillian.Walk(x, y);//where x,y your coordinates
    cVillian.Say("HAHAHAHAHAHHA");
    cVillian.LockView(X);//where X you villian character running view
    cVillian.SetWalkSpeed(4);//To make you villian character run faster
    cVillian.Walk(x, y);//where x,y your coordinates
    cVillian.ChangeRoom(-1);
    cVillian.UnlockView();

    EndCutscene();

Copinstar © Oficial Site

Trent R

Coding cutscenes is exactly the same as any normal scripting. The StartCutscene and EndCutscene commands allow the player to skip scenes (and please allow them, otherwise many ppl will dislike it and your game).


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Goldie

When I did what you said:
function room_FirstLoad()
{
//after cCDavy has entered Room 3
StartCutscene(eSkipESCOnly);

cOn.Walk(542, 230);
cOn.Say("HAHAHAHAHAHAHAHAHAHAHAHA!!!");
cOn.LockView(2);
cOn.SetWalkSpeed(4);
cOn.Walk(584, 0);
cOn.ChangeRoom(-1);
cOn.UnlockView();

I got an error message saying:

Error (line 28): Not enough parameters in call to function.
Jesus said,"Take up your cross and follow me.You will be persecuted."/        I did.

Makeout Patrol

Quote from: Goldie on Mon 02/03/2009 01:10:22
When I did what you said:
function room_FirstLoad()
{
//after cCDavy has entered Room 3
StartCutscene(eSkipESCOnly);

cOn.Walk(542, 230);
cOn.Say("HAHAHAHAHAHAHAHAHAHAHAHA!!!");
cOn.LockView(2);
cOn.SetWalkSpeed(4);
cOn.Walk(584, 0);
cOn.ChangeRoom(-1);
cOn.UnlockView();

I got an error message saying:

Error (line 28): Not enough parameters in call to function.

I don't see a problem in there. Which one is line 28?

Trent R

Well, I just quickly looked up each of those functions, and it appears that SetWalkSpeed requires both an x speed (you've set it to 4), and a y speed--which you've obviously forgotten.

If this ever pops up again on a function, right click it and choose 'go to definition'. If it's a custom function, it'll go to that spot in the script. If it's a built in function, it'll open up the manual. Either way, you can then see the number of parameters that you need, and can easily fix the problem.



~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Khris

Or erase the ( and retype it.

SMF spam blocked by CleanTalk