Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: subspark on Wed 26/10/2005 13:28:03

Title: [SOLVED] Scene Actions skipped / run too quickly
Post by: subspark on Wed 26/10/2005 13:28:03
Everytime I make the EGO do a certain number of things like:
character[EGO].Walk(150,  102);
character[EGO].FaceLocation(150, 0);
gui[1].Visible = false;
character[EGO].Say("Hmm. I think I'll open the blinds on the other side.");
character[EGO].Walk(150,  108);
character[EGO].Walk(215,  102);
character[EGO].FaceLocation(215, 0);
SetCharacterView(EGO, 6);
AnimateCharacterEx(EGO, 0, 0, 0, 90, 1);
SetBackgroundFrame(1);
ReleaseCharacterView(EGO);
Wait(10);
character[EGO].Say("What a goregous view!");
SetGraphicalVariable("Blinds Open",  1);
gui[1].Visible = true;


The player character skips actions and in a flash he's done. He appears to have never waited for his last action to complete. Does my code need more wait(X)'s or something or is my computer just mega fast?

Cheers in advance.
Title: Re: Scene Actions too sketchy!
Post by: Elliott Hird on Wed 26/10/2005 13:28:38
Maybe make the functions blocking? And using 2.7 code? :P
Title: Re: Scene Actions too sketchy!
Post by: subspark on Wed 26/10/2005 13:34:44
Sorry if this is a real dumb question but seeing you just repied and its late on my end I'll be lazy and ask it: How do i script a blocking function.

Yes 2.7 code. Indeed!
Title: Re: Scene Actions too sketchy!
Post by: strazer on Wed 26/10/2005 13:42:15
cEgo.Walk(150, 108, eBlock);
Title: Re: Scene Actions too sketchy!
Post by: subspark on Thu 27/10/2005 01:04:37
Cheers mate. Thanks for the tip.