Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ktalebian on Sun 19/02/2006 10:59:00

Title: Sound, Animation (Solved)
Post by: ktalebian on Sun 19/02/2006 10:59:00
Hey
I have two questions
1) How can I play a sound when the character does something?
2) How can I have an animation in the background? I don't want to have animated background. I want the permenant background, but have an animation in corner, like an object.
Title: Re: Sound, Animation
Post by: Ashen on Sun 19/02/2006 11:26:18
Have you actually tried anything yet? It's not that hard.
Look up PlaySound(..) (http://www.adventuregamestudio.co.uk/manual/PlaySound.htm), PlaySoundEx(..) (http://www.adventuregamestudio.co.uk/manual/PlaySoundEx.htm) (in fact, any of the Multimedia functions (http://www.adventuregamestudio.co.uk/manual/Multimedia%20functions.htm) relating to sound, and Object.Animate(...) (http://www.adventuregamestudio.co.uk/manual/Object.Animate.htm). (Interaction Editor equivalents, 'Game - Play sound effect' and 'Object - Start object animating'.)
Remember, you'll need to assign a view to the object, before you can animate it (Object.SetView(..) (http://www.adventuregamestudio.co.uk/manual/Object.SetView.htm) or 'Object - Set object view number').
Title: Re: Sound, Animation
Post by: ktalebian on Mon 20/02/2006 05:50:39
thxx, butt umm, how do I usee it? So I upload the picture. Then in the view panel, I make an animation. now what do I do?


Actually, nvm, it worked! But I want the animation to be continous in the background! Right now, I have to do something for the animation to start!

Also, for the sound, you upload the musics in the MUSIC directory right? Cause I am using the script you told me above, but it gives me an error and it does not play the thing
Title: Re: Sound, Animation
Post by: Ashen on Mon 20/02/2006 10:46:12
Assign the view and start the animation in the 'Player enters room (before fadein)' interaction.

As of V2.71 MUSIC goes in the music folder, SOUNDs stay in the main game folder. What is the error message you get?
Title: Re: Sound, Animation
Post by: ktalebian on Tue 21/02/2006 07:31:19
oook, thxx, the problem is fixed! I thought I need to place the sound files in Music folder as well!