Camera follow character

Started by manny.p, Wed 22/06/2005 18:26:29

Previous topic - Next topic

manny.p

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.

strazer

The easiest way would be to make that character the player character temporarily, then switch back to the default player character.

Nathan23

Could you be more specific, I don't follow the idea ;)

strazer

AGS v2.7:

Code: ags

  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

Babar

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.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Scummbuddy

do a forum search on 'smart scrolling'
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Nathan23

Many thanks Strazer,  I never figure out this.

SMF spam blocked by CleanTalk