No control because of an eRepeat Animation [SOLVED]

Started by 10o, Thu 13/10/2011 20:24:44

Previous topic - Next topic

10o

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?

Gudforby

#1
You could set the animation as an idle view.

Code: ags

cTyp.SetIdleView(2, 0);

10o

Hm I get an error:

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


Gudforby

#3
Actually, there is a much easyer way.. silly me..  ::)

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

Code: ags

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

Khris

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.

Code: ags
  cTyp.Animate(2, 1, eRepeat, eNoBlock);

10o

Thank you guys,
it works now.

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

SMF spam blocked by CleanTalk