Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 25/05/2004 16:59:04

Title: scripting a room change
Post by: on Tue 25/05/2004 16:59:04
I got a room with 4 different "animated backgrounds". Since 4 seems to be the limit of bacgrounds, I need to continue the background animation in a new room if you follow me.

Now how do I script a room change when the fourth background has been shown?

if anyone could help I'd be glad  :)
Title: Re: scripting a room change
Post by: Scummbuddy on Tue 25/05/2004 18:02:59
woa, i dont think thats going to be necessary. why are you animating your background? do you have like flames on torches that you are animating?
Title: Re: scripting a room change
Post by: .. on Tue 25/05/2004 18:10:41
You habe four Frames... They are not seperate backgrounds but frames that play over and over.
Title: Re: scripting a room change
Post by: on Wed 26/05/2004 15:23:39
yes I have four frames, and I'd like to change to a new room when those four frames has been shown instead of continuing the loop

all I got from the help menu was the command
NewRoom()

But I can't seem to make it work at all
I wrote NewRoom(2) but I think I have to put it inside of a function or sumtin' or am I totally wrong here.

I'll continue to try and write the results here, but if anyone can help I'd be glad. It would also be nice if one could control the changing of the backgrounds with scripting. :)
Title: Re: scripting a room change
Post by: on Wed 26/05/2004 15:30:06
Ok I just made the whole screen a hotspot and told the player to click anywhere.

the easiest is often the best ;)
Title: Re: scripting a room change
Post by: Tarlash on Wed 26/05/2004 16:09:42
Not best way, if you'll be adding additional hotspots.
Title: Re: scripting a room change
Post by: Darth Mandarb on Wed 26/05/2004 17:35:32
Changing rooms isn't the answer ....

If you want the room to be interactive at all, changing the room kills that ability because after just 4 frames the room will change ... is the animation something you want to loop?Ã,  If so you'll be going back and forth back and forth and you'll never be able to move the character.

What kind of animation is going on in the background that requires more than 4 frames?

Have you considered using animated objects for this?Ã,  It's the smarter way to go because you can still interact (walk/talk/look/etc) within the room this way.Ã,  If you change rooms after 4 frames you can't.

Can you give us a little more information about what you're trying to accomplish?