SOLVED: Dialogue options triggering camera movement

Started by maximusfink, Tue 26/06/2012 21:58:39

Previous topic - Next topic

maximusfink

I have a situation in my game where the character is in the city, and has to ask someone for directions. My game runs in 320x240, but this room is 320x400, and the walkable area is in the bottom of it. When the player initiates dialogue with the appropriate character, a few options come up. One of these options (asking for directions) will trigger the end of the dialogue, as well as the end of the 'scene' so to speak. Upon choosing this dialogue option, I want the text to appear,the dialogue to stop, the cursor to disappear, and the view to pan up to the skyline of the city (which is not visible in the initial view due to the room's height), and finally for the screen to fade to black as a transition to the next room.

How easy would this be to pull off? I'm not necessarily asking for detailed instructions or anything, but if any more experienced users could point me in the right direction or have any ideas, all help is appreciated.

Khris

It's not that hard, especially since stuff is supposed to happen in sequence.
You can put normal script commands inside dialog scripts, you just have to indent them by at least one blank space.

Just put something like this in the dialog script, beneath the entry point of the dialog option:

Code: ags
@4
player: I'll be on my way then.
 mouse.ChangeModeGraphic(eModeWait, 0);  // hide mouse
 Wait(40);
 int y = GetViewportY();
 while (y > 0) {
   y--;
   SetViewport(0, y);
   Wait(1);
 }
 Wait(20);
 player.ChangeRoom(2);
stop


Not tested.

SMF spam blocked by CleanTalk