Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: 10o on Thu 13/10/2011 20:24:44

Title: No control because of an eRepeat Animation [SOLVED]
Post by: 10o on Thu 13/10/2011 20:24:44
When I enter the room where a NPC is doing an constantly repated Animation I'am not able to move my Player.


function room_AfterFadeIn()
{
 cTyp.Animate(2, 1, eRepeat);
}


What possiblitys do I have to animate the NPC while moving my player?
Title: Re: No control because of an eRepeat Animation
Post by: Gudforby on Thu 13/10/2011 20:31:11
You could set the animation as an idle view.


cTyp.SetIdleView(2, 0);
Title: Re: No control because of an eRepeat Animation
Post by: 10o on Thu 13/10/2011 20:42:58
Hm I get an error:

"The character 'Typ' could not be displayed because ther were no frames in loop 0 of view 2."

Title: Re: No control because of an eRepeat Animation
Post by: Gudforby on Thu 13/10/2011 20:45:43
Actually, there is a much easyer way.. silly me..  ::)

Using your first code, simply adding eNoBlock afer it should do the trick.


function room_AfterFadeIn()
{
 cTyp.Animate(2, 1, eRepeat, eNoBlock);
}
Title: Re: No control because of an eRepeat Animation
Post by: Khris on Thu 13/10/2011 20:46:23
From the manual:
QuoteFor blocking you can pass either eBlock (in which case the function will wait for the animation to finish before returning), or eNoBlock (in which case the animation will start to play, but your script will continue). The default is eBlock.

 cTyp.Animate(2, 1, eRepeat, eNoBlock);
Title: Re: No control because of an eRepeat Animation [SOLVED]
Post by: 10o on Thu 13/10/2011 20:51:29
Thank you guys,
it works now.

I've tryed to look it up in the manuel before, but overread it  :P