Permanent Background Animation

Started by Blackshaw, Wed 26/03/2008 18:53:34

Previous topic - Next topic

Blackshaw

Hello everyone!

I would like to ask something about building a permanent Animation in the background of my Adventure-Room. I would like to animate burnig candles . But ich don't want to use 5 different Background. I just want to make a animated object. I can't find a command, which helps me building an animation, which starts with entering the room and is endless.

I already imported the sprites. Can anybody help me?

Blackshaw

P.S.: Sorry for my bad english!

TwinMoon

You need to go to the VIEW panel and build a new animation out of your images.
Then go to your room and add an object. You may want to give it an appropriate name, like oCandle or oCandle1 (the o is for object).

Open the events tab (the button with the lightning) and add an 'Enter room before fade-in' event.
Make sure you add this to the room, and not to the object. The pulldown-menu in the middle right should say something like "Room name (Room; number 1)".

You should be in your room script and see:

Code: ags

function room_Load()
{

}


After the { put:
Code: ags

oCandle.SetView(VIEWNAME);
oCandle.Animate(0, 5, eRepeat, eNoBlock);


If any of this is unclear, just ask.

Dualnames

In case it is unclear i can help you get more from AGS.
oCandle: is the script name of your object. it's description will not work here.
objectscriptname.SetView(int view); :is a function that sets a view for an object. In view is the number of the view.
ovjectscriptname.Animate(int loop,int delay,emode,eblock): This function animates an ovject using the selected loop of its current view and playing it in a speed of 5(which is usually fine, decrease it to increase the speed of animation and increase it to slow it down) , selects how many times it will play it (infinite or once) and whether it will allow the player to do anything. Which means if you put eBlock instead of eNoBlock the wait cursor will stay there and will allow you do to nothing.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk