Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: spook1 on Thu 20/04/2006 20:38:00

Title: skip intro, but how to interact??[SOLVED]
Post by: spook1 on Thu 20/04/2006 20:38:00
I have created an intro using the Typeline functions as explained in the archive forum.

Everything works great, but now I want to make a skip intro button.
It is not possible however to click anything, as long as the typeline functions are running.

is there an easy workaround?

a snippet of my intro is shown below:



#sectionstart room_bÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
Ã,  // script for Room: First time player enters room
Ã, 
gSimlektogui.Visible = false;
Ã, 
textoverlay0 = TypeLine("Your nameÃ,  Ã,  : Joanne Philps",10);
Wait(10);
textoverlay1 = TypeLine("Your jobÃ,  : Undercover Agent",20);
Wait(10);
textoverlay2 = TypeLine("Your coverÃ,  Ã, : Maintenance and installation engineer",30);
Wait(10);
textoverlay3 = TypeLine("LocationÃ,  Ã,  : Anton Medical Centre",40);
Wait(30);

textoverlay0.Remove();
textoverlay1.Remove();
textoverlay2.Remove();
textoverlay3.Remove();


any suggestions?


Title: Re: skip intro, but how to interact??
Post by: strazer on Thu 20/04/2006 20:41:12
Try enveloping your code with the StartCutscene (http://www.adventuregamestudio.co.uk/manual/StartCutscene.htm) and EndCutscene (http://www.adventuregamestudio.co.uk/manual/EndCutscene.htm) commands.
Title: Re: skip intro, but how to interact??
Post by: spook1 on Thu 20/04/2006 21:28:31
That works great, Thanks.

now I get an error though:

First the error occurred on the change room event.
i removed the cutscen tags, but the problem remained.
then I put the cutscene tags back, and now I get an error as soon as I click the mouse.

In my cutscene I use textoverlay pointers, but fater the cutscen I remove any overlays with



EndCutscene();

if (textoverlay0.Valid) {textoverlay0.Remove();}
if (textoverlay1.Valid) {textoverlay1.Remove();}
if (textoverlay2.Valid) {textoverlay2.Remove();}
if (textoverlay3.Valid) {textoverlay3.Remove();}




---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0043819B ; program pointer is +379, ACI version 2.72.902, gtags (1,3)

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.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OK   
---------------------------
Title: Re: skip intro, but how to interact??
Post by: strazer on Thu 20/04/2006 21:42:05
I can't see anything wrong with the code you posted.

Are the remove overlay lines the reason for the crash? What happens if you comment them out?

At least in AGS v2.61, "program pointer +379" was related to DirectDraw messing up (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=13777.msg166449#msg166449).
But that doesn't have to mean anything as in newer versions these error codes can be different.

Any chance you could upload the game for us to take a look at?
Title: Re: skip intro, but how to interact??
Post by: spook1 on Thu 20/04/2006 21:48:14
Strazer,
I can upload the game, ofcourse.
But I am happy to tell you that it won't be necessary.

The problem has been solved already, by myself ! ;-P
It was a gui that I made invisble before room entrance.
I removed this line and now everything works great.
The gui was already invisble from the global script and apparentntly I cannot set a gui to invisble twice in a row...

Anyway, problem is solved, and once the (training) game is finished I'll be happy to share it

thanks a lot for your immediate interest in my little problems.

Martijn
Title: Re: skip intro, but how to interact??
Post by: strazer on Thu 20/04/2006 22:02:09
You're welcome! Glad you got it working. :)
Title: Re: skip intro, but how to interact??
Post by: Scorpiorus on Fri 21/04/2006 00:03:27
Quote from: spook1 on Thu 20/04/2006 21:48:14It was a gui that I made invisble before room entrance.
I removed this line and now everything works great.
The gui was already invisble from the global script and apparentntly I cannot set a gui to invisble twice in a row...

I wonder can that recent thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=26070.0) be somehow related to this one?

It's AGS v2.71 though and it's about some graphic mess when "gIconbar.Visible = false;" is done on "before fade-in".
Title: Re: skip intro, but how to interact??
Post by: SSH on Fri 21/04/2006 10:11:45
Quote from: spook1 on Thu 20/04/2006 21:28:31


EndCutscene();

if (textoverlay0.Valid) {textoverlay0.Remove();}
if (textoverlay1.Valid) {textoverlay1.Remove();}
if (textoverlay2.Valid) {textoverlay2.Remove();}
if (textoverlay3.Valid) {textoverlay3.Remove();}



You coudl try:


if (textoverlay0!=null && textoverlay0.Valid) textoverlay0.Remove();
//etc.

Title: Re: skip intro, but how to interact??
Post by: strazer on Fri 05/05/2006 16:01:05
spook1, did SSH's code fix the crash?
Title: Re: skip intro, but how to interact??
Post by: spook1 on Fri 05/05/2006 16:05:44
Sorry, I should have rnamed this one to SOLVED.

As I mentioned a few replies earlier:
Quote
The problem has been solved already, by myself ! ;-P
It was a gui that I made invisble before room entrance.
I removed this line and now everything works great.

So I did not try the other solutions anymore..