Problems skipping a cutscene

Started by LeChuck, Wed 06/09/2006 12:51:44

Previous topic - Next topic

LeChuck

This snippet plays great ingame, as long as I don't try to skip it.

Room 2:
Code: ags

StartCutscene(eSkipESCOnly);
GUIOff(LUGGAGE);
hasmedicine = 1;

cEgo.Walk(222,138,eBlock,eAnywhere);
cEgo.Say("Animate: Open Door");
ObjectOff(2);
ObjectOn(1);
cEgo.Walk(174, 92, eBlock, eAnywhere);

SetCharacterTransparency(EGO, 100); // LINE 118, THIS LINE GIVES THE ERROR

DisableRegion(2);

cCar.ChangeRoom(2, 168, 89); // SPAWN CAR

cCar.Walk(225, 139,eBlock,eAnywhere);
cCar.Walk(208, 157,eBlock,eAnywhere);
ObjectOff(1); // TURN ON OPEN DOOR SPRITE
ObjectOn(2); // TURN OFF CLOSED DOOR SPRITE
cCar.Walk(161, 171,eBlock,eAnywhere);
cCar.Walk(98, 187,eBlock,eAnywhere);
cCar.Walk(74, 204,eBlock,eAnywhere);

SetGlobalInt(212, 1); // TRIGGERS CONTINUATION OF CUTSCENE WHEN ENTERING NEXT ROOM
EnableRegion(2);
cCar.ChangeRoom(15, 124, 121);

player.ChangeRoom(15, 179, 156);


Room 15:
Code: ags


// script for Room: Player enters room (after fadein)
if ((player.prevroom==2) && (GetGlobalInt(212)==1)) {
 SetGlobalInt(212, 0);
 DisableRegion(1);

 cCar.Walk(114, 142,eBlock,eAnywhere);
 cCar.Walk(150, 146,eBlock,eAnywhere);
 cCar.Walk(187, 175,eBlock,eAnywhere);
 cCar.ChangeRoom(20);
 ObjectOn(0);
Ã,  
 SetPlayerCharacter(EGO);
 SetCharacterTransparency(EGO, 0);
Ã,  
 EnableRegion(1);

 AddInventory(13);
Ã,  
 GUIOn(LUGGAGE);
 EndCutscene();
}


If I do try to skip, I get this error:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00472148 ; program pointer is +7, ACI version 2.72.920, gtags (315,76)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in Room 2 script (line 118)


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OKÃ,  Ã, 
---------------------------



Any ideas what's going on? Why would setting the player character's transparacy value to 100 cause problems skipping the cutscene?

Ashen

Since the error message refers to room 2, I don't think setting the transparaency is what's causing the error. What IS line 118 in room 2?
I don't think Cutscenes (as in, with the Start/EndCutscene commands) work across rooms, so you might have to 'end' it before the player.ChangeRoom commands and 'start' it again in room 15.

Als, why are you mixing new and onld AGS commands? You're using cCar.walk(...) etc (new style), but still using the old-style GUIOn, ObjectOn, SetPlayerCharacter, SetCharacterTransparency, Disable/Enableregion commands (and possibly others). Not that that's likely to cause an error in itself (or at least, not the error you're getting), but for consistancy's sake you might want to update them.
I know what you're thinking ... Don't think that.

LeChuck

Quote from: Ashen on Wed 06/09/2006 13:35:51
Since the error message refers to room 2, I don't think setting the transparaency is what's causing the error. What IS line 118 in room 2?
I don't think Cutscenes (as in, with the Start/EndCutscene commands) work across rooms, so you might have to 'end' it before the player.ChangeRoom commands and 'start' it again in room 15.
Line 118 IS the transparency line, see the comment in the margin of the first code snippet. Also, Start/EndCutscene does work across rooms, I've done it loads of times and it skips perfectly. Except this time!Ã,  :(

Quote from: Ashen on Wed 06/09/2006 13:35:51
Als, why are you mixing new and onld AGS commands? You're using cCar.walk(...) etc (new style), but still using the old-style GUIOn, ObjectOn, SetPlayerCharacter, SetCharacterTransparency, Disable/Enableregion commands (and possibly others). Not that that's likely to cause an error in itself (or at least, not the error you're getting), but for consistancy's sake you might want to update them.

I have no problems mixing old and new commands, I would rather use a familiar line than start looking through the manual just to keep "up to date". It's all a matter of personal preference, that is until Chris some day decides to pull the plug on the old style commands...Ã,  :-\

Gilbert

Since we're not sure if it's a bug of the engine or not, try doing each of the following and see if it still crash, so to narrow down the cause of the problem, otherwise we can't help much unless we see your game files:
1. Comment the line where the crash reported
2. Move the EndCutscene() function to room 2, just before the player changes room
3. Try changing the line in question to using the new OO-style:
  cEgo.Transparency=100;

SMF spam blocked by CleanTalk