Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: manny.p on Wed 22/06/2005 18:26:29

Title: Camera follow character
Post by: manny.p on Wed 22/06/2005 18:26:29
I want the camera to follow a different character, i looked in help but all i could find was it to move a certain amount of pixles or go to co ordinants.

What i want is it to follow (camera/screen) this other character, then return to it's normal character.
Title: Re: Camera follow character
Post by: strazer on Wed 22/06/2005 18:32:22
The easiest way would be to make that character the player character temporarily, then switch back to the default player character.
Title: Re: Camera follow character
Post by: Nathan23 on Thu 23/06/2005 22:11:12
Could you be more specific, I don't follow the idea ;)
Title: Re: Camera follow character
Post by: strazer on Thu 23/06/2005 22:30:24
AGS v2.7:


  Character *prevchar = player; // save current player character
  cSomeguy.SetAsPlayer(); // make SOMEGUY the player character
  cSomeguy.Walk(150, 100, eBlock, eAnywhere); // have SOMEGUY walk to the middle of the room
  prevchar.SetAsPlayer(); // after SOMEGUY has arrived, revert to previous player character
Title: Re: Camera follow character
Post by: Babar on Fri 24/06/2005 22:22:09
interesting question...just out of curiosity, how can you make the player character centred (Monkey Island style)?
As in a scrolling room, instead of scrolling only when the player is at the edge, the "Camera" is always following the player.
Title: Re: Camera follow character
Post by: Scummbuddy on Fri 24/06/2005 22:31:46
do a forum search on 'smart scrolling'
Title: Re: Camera follow character
Post by: Nathan23 on Sat 25/06/2005 17:02:11
Many thanks Strazer,  I never figure out this.