Cutscene problem.

Started by HillBilly, Mon 01/03/2004 07:12:47

Previous topic - Next topic

HillBilly

Right, I'm gonna try to make this as short as possible:

I'm gonna make a intro cutscene with the hero on the floor, sleeping. So, therefore I need to aware AGS that it's a start of a cutscene, putting the StartCutscene (1); action there. Next, I remove the GUI's, using the GUIOff (0); and GUIOff (2); actions. After that, I start the sleeping animation:

Code: ags

SetCharacterView(EGO,5);
AnimateCharacterEx(EGO, 0, 12, 5, 0, 0);


I test the game, but when the scene start, I can in about 1 second see the GUI, and that EGO stands(Front walking animation first frame). Is there any way to make this go away?  ???

Just in case someone didn't understand, here's the cutscene(I removed the text so it wouldn't spoil the storyline for later):

http://hbw.stickthemepark.com/ImagesHost/BG/example.zip
(ALT+F4 to close it)

EDIT: While I'm at it: The background seems to f*ck up sometimes. Any reason for that? The relative size is 320x200 even the game is 640x400. If that's the problem, is there any way to change it?

Gilbert

Try putting the codes into "player enters screen before fade in" instead and see if it changes anything.

HillBilly

Yeah, I get an error:

Code: ags

(Room 1 Script line 11)
Error: A text script run in the Players Enters Screen event caused the screen to be updated. If you need to use Wait(), so do it After Fadein.


Right, so i go and edit the code and remove all "Wait()" Actions. I try to test the game again, and get the same error. Here's the script I used:

StartCutscene (1);
GUIOff (0);
GUIOff (2);
SetCharacterView(EGO,5);
AnimateCharacterEx(EGO, 0, 12, 5, 0, 0);
DisplaySpeech (CELL , "RING");
DisplaySpeech (CELL , "...");
DisplaySpeech (CELL , "RING");
DisplaySpeech (CELL , "...");
DisplaySpeech (CELL , "RING"); <LINE 11
SetCharacterView(EGO,7);
AnimateCharacterEx(EGO, 0, 5, 0, 0, 1);
SetCharacterSpeechView(EGO, 6);
DisplaySpeech (EGO , "...Blah?");
SetCharacterView(EGO,8);
DisplaySpeech (CELL , "Blah.");
SetCharacterSpeechView(EGO, 6);
DisplaySpeech (EGO , "Blah?");
SetCharacterView(EGO,8);
DisplaySpeech (CELL , "Blah!");
DisplaySpeech (CELL , "Blah,");
DisplaySpeech (CELL , "Blah!!");
DisplaySpeech (CELL , "*click*");
SetCharacterView(EGO,7);
AnimateCharacterEx(EGO, 0, 5, 0, 1, 1);
SetCharacterView(EGO,9);
AnimateCharacterEx(EGO, 0, 4, 0, 0, 1);
SetCharacterSpeechView(EGO, 10);
DisplaySpeech (EGO , "Blah.");
SetCharacterView(EGO,11);
DisplaySpeech (EGO , "...");
SetCharacterSpeechView(EGO, 10);
DisplaySpeech (EGO , "Blah");
SetCharacterView(EGO,12);
AnimateCharacterEx(EGO, 0, 3, 0, 0, 0);
SetCharacterSpeechView(EGO, 13);
DisplaySpeech (EGO , "...");
DisplaySpeech (EGO , "Blah?!");
SetCharacterView(EGO,15);
DisplaySpeech (EGO , "...");
SetCharacterSpeechView(EGO, 14);
DisplaySpeech (EGO , "Blah...");
SetCharacterView(EGO,15);
DisplaySpeech (EGO , "...");
SetCharacterSpeechView(EGO, 14);
DisplaySpeech (EGO , "Blah");
SetCharacterView(EGO,15);
DisplaySpeech (EGO , "...");
SetCharacterSpeechView(EGO, 14);
DisplaySpeech (EGO , "Blah");
SetCharacterView(EGO,15);
DisplaySpeech (EGO , "...");
SetCharacterSpeechView(EGO, 14);
SetCharacterView(EGO,15);
DisplaySpeech (EGO , "Blah");
SetCharacterView(EGO,15);
DisplaySpeech (EGO , "...");
SetCharacterSpeechView(EGO, 10);
DisplaySpeech (EGO , "Blah");
DisplaySpeech (EGO , "...");
DisplaySpeech (EGO , "Blah");
GUIOn (0);
GUIOn (2);

Pumaman

Why are you passing 5 as the repeat parameter to AnimateCharacterEx?

What loop number is the sleeping animation?

Re-check the manual for AnimateCharacterEx, and make sure you are passing the parameters in the right order.

a-v-o

You should split your code into 2 parts and put the first part into "...before fadein":

StartCutscene (1);
GUIOff (0);
GUIOff (2);
SetCharacterView(EGO,5);

All other stuff like Animate... and Display... should be in "...after fadein" because they update the screen. You can then use Wait in the code.

HillBilly

Quote from: Pumaman on Mon 01/03/2004 22:21:34
Why are you passing 5 as the repeat parameter to AnimateCharacterEx?

Because I wanted the animation to repeat 5 times.

a-v-o, Thanks, that did the trick!  :D

SSH

Quote from: HillBilly on Tue 02/03/2004 17:19:13
Quote from: Pumaman on Mon 01/03/2004 22:21:34
Why are you passing 5 as the repeat parameter to AnimateCharacterEx?

Because I wanted the animation to repeat 5 times.

The repeat command is actually a boolean, not a counter. 1 means repeat forever, 0 means do it once. So for five repeats you  need the repeat parameter set to 0 and run the command 5 times with the blocking parameter set, or without blocking, you need to set a counter and use your repeatedly_execute to restart the animation.

Maybe CJ could rename the function prototypes of all functions with "int x" where x can only be 0 or 1 to be "bool x" instead? That would help avoid these kind of problems... or alternatively, RTFM!
;)
12

HillBilly

meh. It works, good enough for me.

SMF spam blocked by CleanTalk