skip intro, but how to interact??[SOLVED]

Started by spook1, Thu 20/04/2006 20:38:00

Previous topic - Next topic

spook1

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:


Code: ags

#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?



strazer

Try enveloping your code with the StartCutscene and EndCutscene commands.

spook1

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

Code: ags


EndCutscene();

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



Code: ags

---------------------------
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   
---------------------------

strazer

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.
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?

spook1

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

strazer

You're welcome! Glad you got it working. :)

Scorpiorus

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 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".

SSH

Quote from: spook1 on Thu 20/04/2006 21:28:31
Code: ags


EndCutscene();

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



You coudl try:

Code: ags

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

12

strazer

spook1, did SSH's code fix the crash?

spook1

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..

SMF spam blocked by CleanTalk