Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: EnterTheStory (aka tolworthy) on Mon 22/09/2008 14:10:48

Title: how to tell if a loop exists? (SOLVED)
Post by: EnterTheStory (aka tolworthy) on Mon 22/09/2008 14:10:48
Is there any way I can check if a view loop exists before calling it and risking a crash?
Title: Re: how to tell if a loop exists?
Post by: GarageGothic on Mon 22/09/2008 14:51:01
You can use Game.GetLoopCountForView(int view) (and similar use Game.GetFrameCountForLoop to check that an existing loop doesn't have 0 frames).
Title: Re: how to tell if a loop exists?
Post by: EnterTheStory (aka tolworthy) on Mon 22/09/2008 16:38:36
Quote from: GarageGothic on Mon 22/09/2008 14:51:01
You can use Game.GetLoopCountForView(int view) (and similar use Game.GetFrameCountForLoop to check that an existing loop doesn't have 0 frames).
Thanks! Much appreciated!