Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Thu 11/01/2007 17:08:05

Title: Having a character continuously animated in the background
Post by: on Thu 11/01/2007 17:08:05
Hello there,

I want to have a NPC continuously move in the background(he moves his head like he is searching something.) I know that this topic is dealt with in the manual and I found a topic from november the 30th about it, but it doesn't work in my script. Here is what I did:
function repeatedly_execute()
  {
  cNPC1.Animate(cNPC1.Loop,0,eRepeat,eNoBlock);
  }
He moves his head when I change the script to "eBlock" but than I can't do anything anymore.
I also tried:
cNPC1.SetIdleView(4,0);
but nothing is happening...
I hope somebody can help me out. Thank you very much in advance...
Title: Re: Having a character continuously animated in the background
Post by: SSH on Thu 11/01/2007 17:10:05
Your code would be better in the "player enters room" interaction. If it repeatedly executes, the animation starts again every game cycle, so it looks like he's doing nothing at all...
Title: Re: Having a character continuously animated in the background
Post by: on Thu 11/01/2007 17:18:15
where do I find the player enters room interaction?
Title: Re: Having a character continuously animated in the background
Post by: on Thu 11/01/2007 17:23:33
It works, i wrote it in the:
function game_start()
now it runs, ha thank you very very much for the fast reply, have a nice day
Title: Re: Having a character continuously animated in the background
Post by: Khris on Thu 11/01/2007 18:04:13
To find the mentioned interaction, click the button with the red i in Room Editor -> Settings.

Glad it works, but one shouldn't call such things in game_start.