Cutscenes (is my script right?)

Started by , Tue 29/06/2004 22:07:43

Previous topic - Next topic

Steve_cheese

Hi
I am a newbie to AGS and I am trying to make a cutscene. I have tried my best but it doesn't seem to work.
Here is my script:

StartCutscene (int skip_with) 3
MoveCharacterBlocking(EGO,120,164,1);
DisplaySpeech (EGO , "My name is Roger!");
DisplaySpeech (EGO , "I live here, my house is just behind me!");
DisplaySpeech (EGO , "It's really really boring but");
DisplaySpeech (EGO , "my boss is sending me to the beach");
DisplaySpeech (EGO , "Why? I don't know");
DisplayAt (50, "You leave for the beach");
DisplayThought (narrator, "And off to the beach you go!");
EndCutscene()

When i try to run the game this comes up:   
There was an error compiling your script. The problem was:
In: 'Main script'
Error (line 5): Parse errror in expr near 'int'

Can someone please help me?



scotch

Yes, but don't reply to your own posts just to get replies.

you want to change the line

StartCutscene (int skip_with) 3;

to

StartCutscene (3);

you put the parameters you want to give to any function within those brackets, int means the parameter should be a number.

Steve_cheese

Thanks Scotch!
It works now but  i have another problem.
When i run the game, the character appears as the sursor as well.
Could look at my script (below) and tell me what i have done wrong.

StartCutscene (3);
MoveCharacterBlocking(EGO,300,153,0);
DisplaySpeech (EGO , "My name is Roger!");
DisplaySpeech (EGO , "I live here, my house is just behind me!");
DisplaySpeech (EGO , "It's really really boring but");
DisplaySpeech (EGO , "my boss is sending me to the beach");
DisplaySpeech (EGO , "Why? I don't know");
EndCutscene();

Steve_cheese

I have also got one more problem, my character walks over to his house and faces right. I want him to face forward.
How do i do it?
Plz help, I really will appreciate it. Thanks

Steve

Jet Kobayashi Zala

#4
Well, by the looks of it, if you have your character walking right to get to the house, but want him to face another direction (that's what I'm thinking you mean), use the FaceLocation() function after the MoveCharacterBlocking ():

FaceLocation (CHARID, int x, int y);

Example:
FaceLocation(EGO,150,146);

Just change the 150 and 146 to the coordinates you want the character to face, by facing forward, I assume you mean facing the screen, so raise the y value like so:

StartCutscene (3);
MoveCharacterBlocking(EGO,300,153,0);
FaceLocation(EGO, 300, 160);
DisplaySpeech (EGO , "My name is Roger!");
...

That will get the character facing down from where you set MoveCharacterBlocking () to stop.

As for the first problem, I'm not sure what you mean about the character appearing as a "sursor" (cursor)?Ã,  Does the character always appear like this?Ã,  If so, it might be an issue with setting the correct character view in the Character section of the editor.Ã,  Maybe you have it set to an animated cursor instead of to the walking view?  If I can help any more, feel free to ask, and hope that helped some.

Steve_cheese

Thanks Zet

I added FaceLocation to my script and now my character faces forward. As for the cursor thing, i have sorted it out, for some reason i had the character view as an animation for the wait cursor. Thanks for all your help!

SMF spam blocked by CleanTalk