Blinking backgrounds SOLVED

Started by TheRoger, Sat 06/03/2010 20:50:25

Previous topic - Next topic

TheRoger

I added 2 backgrounds into room, one is for lit chamber, other is for dark one. I used SetBackgroundFrame() in lamp script, then blinking stopped and room bacame lit. How to do that when you start room, it would be dark?

Khris

What did you put inside the ()?

(Note: with questions like this, ALWAYS post the exact code you've used. Saves you and us time.)

TheRoger

I putted 0 later 1, tried all backgrounds I have (sorry about that)

monkey0506

If I understand the problem you're saying that the room is animating between all the backgrounds until you interact with the lamp where you are calling SetBackgroundFrame which is then locking the background to the lit background frame.

Just use the enters room after fade-in event and call SetBackgroundFrame. It should be in events pane just like where you went to link the event for the lamp's interaction, but you need to select the events for the room itself instead of the events for a hotspot/object.

AGS automatically animates rooms that have more than one background unless SetBackgroundFrame has been used to lock the background to a specific frame.

TheRoger

Found my mistake, I forgot to set code in room events tab, sorry for your time.

SMF spam blocked by CleanTalk