Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Pixelton on Sat 08/05/2010 04:54:18

Title: Common LockView error
Post by: Pixelton on Sat 08/05/2010 04:54:18
I've hit this problem a few times and I've done a forum search and looked at the Manual that comes with AGS - with little luck I thought I'd post it.

I have a character that changes view and animates before displaying a GUI window. The problem is I get an error saying that: 'The character could not be displayed because there were no frames in loop(no.) of view(no.).

Here is some script that the break is happening in:
{
    if (cJohnny.IsCollidingWithObject(oGasleak)) {
    cJohnny.LockView(34);
    PlaySound(6);
    cJohnny.Animate(0, 3, eOnce, eBlock, eForwards);
    Wait(50);
    Display("Message is displayed.");
    gGUIWindow.Visible = true;
    oGasleak.Visible = false;
    oGas_leak2.Visible = true;
  }


As I've had this problem a few times and never really understood why it happens and generally fix it by just playing around with the script until it plays ball.
Title: Re: Common LockView error
Post by: DrewCCU on Sat 08/05/2010 05:03:11
i'm sure you've tried this but in case not , i have to ask.

Are there frames in View 34's Loop 0?
Title: Re: Common LockView error
Post by: Pixelton on Sat 08/05/2010 05:07:50
haha, yes of course...and if I create the loop it's crying for it just says theres no frames in the next loop...etc.
Title: Re: Common LockView error
Post by: DrewCCU on Sat 08/05/2010 05:13:15
Quote from: Mark Borg on Sat 08/05/2010 05:07:50
haha, yes of course...and if I create the loop it's crying for it just says theres no frames in the next loop...etc.


Ohhh .,.. i don't know if this is the problem but check to see if you have "Run the next loop after this to make a long animation" box checked in the view window. If it is checked, uncheck it.
Title: Re: Common LockView error
Post by: Pixelton on Sat 08/05/2010 06:08:53
ahh nice try

Sadly thats not the problem, I'll ask around and if i find a solution to this outside the forum then I'll post it here.
Title: Re: Common LockView error
Post by: Dualnames on Sat 08/05/2010 12:27:30
Where's the cJohny.UnlockView function. You need to put that, that's probably the reason why this happens.
Title: Re: Common LockView error
Post by: Pixelton on Sat 08/05/2010 14:22:52
Nope even with the UnlockView function I get the error, plus I'm not sure if this is correct but I also want to hold on the last frame of that view change so I don't know if I;d want to release the view back to AGS.