Animating Backgrounds problem (SOLVED)

Started by , Mon 26/06/2006 17:03:24

Previous topic - Next topic

Riklurt

I'm trying to make an animating background which is part of a story sequence; Essentially, I'm giving the background story using DisplayAt commands, and then changing backgrounds in between pieces of story - right now it looks something like this;

SetBackgroundFrame(0);
Display ("The history of the Roarke family is as silent as the grave, and it is known to very few.");
Display ("It is said that centuries ago, in the Dark Ages, the Devil himself married a young and foolish woman, and that he did so under a false name:");
SetBackgroundFrame(1);
Display ("Master Roarke.");

So what I intend is for the background to change after the window reading "It is said...false name" to depict a scary-looking Devil instead. But when I test the game, nothing happens.

Is there something wrong with the script, or is what I'm trying to do simply not possible using SetBackgroundFrame? I could simply animate the background really slowly, but then things will be out of sync if the player clicks through the dialogue boxes.

Help appreciated :)

Ashen

#1
It's possible with SetBackgroundFrame, and that code should work ... I take it you've definitely imported the second frame? (Sorry, but it's best to get the obvious stuff out of the way first.)

Also, where have you put the code? It's probably not the problem, if the Display lines work, but worth checking anyway.
I know what you're thinking ... Don't think that.

Riklurt

Yes, they're imported - I took a guess that the regular background frame is number 0?

I've got the code scripted under "when player enters room - after fadein", could that be the problem? Where should I put it?

Ashen

You're right, the 'regular' frame is 0, the others are 1-4.

That should work perfectly. If you don't call the SetBackgroundFrame commands, does it animate normally?
You could try the SetBackgroundFrame(0); in 'Player enters room before fadein', and the rest in 'after'.
I know what you're thinking ... Don't think that.

Riklurt

I've tested a few things now, and it seems the background does not animate while display windows are up.

I removed the SetBackgroundFrame commands, and the animation only starts after I've clicked through all of the display windows.

GarageGothic

Try putting a Wait(1) after each SetBackgroundFrame command and see if that helps. It could be that the frame is only changed at the end of each game loop.

Ashen

Quoteit seems the background does not animate while display windows are up
That's normal - Display is a blocking command so most other functions (including Background animation obviously, as well as Character/Object animation, Keypress logging, etc) are paused until it's over.

I was just going to suggest the same thing as GG, as well.
I know what you're thinking ... Don't think that.

Riklurt

That solved the problem. Thanks, GarageGothic.  :)

SMF spam blocked by CleanTalk