Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Flyman on Sat 14/01/2012 21:02:26

Title: room not scrolling
Post by: Flyman on Sat 14/01/2012 21:02:26
Hi, I've a problem!!
In a room with the player character all ok..the room scrol when character move...
...in a sequence, I've used a character to walk in the room...the room don't scroll, so the character go out of the screen?? How can resolve to imposte that also when a character "not the "cha.player" walk in the room, the room scrol??
Please help!!
there is a code to resolve, a command specify?
Title: Re: room not scrolling
Post by: monkey0506 on Sat 14/01/2012 21:23:24
The room will scroll automatically if it's bigger than the game resolution and the player walks close to the screen edge.

If you want to scroll it manually you can use SetViewportX and SetViewportY I believe. Or it might just be SetViewport(x, y).
Title: Re: room not scrolling
Post by: Ali on Sat 14/01/2012 23:40:07
If I understand correctly, you want the room to scroll with one character entering a room, then follow another character leaving the room.

Presuming this is in a cutscene, you could temporarily make the second character the player character, have them leave the room, then switch back at a later time. Alternately, you could create an invisible player character who walks around to control scrolling, while other characters perform various actions.

Title: Re: room not scrolling
Post by: Flyman on Sun 15/01/2012 11:42:15
Hi, I've solved opted with "make the second character the player character", thanks!!