Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: NeuroticNugg on Wed 29/12/2010 23:52:56

Title: Changing your main character sprite mid-game -SOLVED
Post by: NeuroticNugg on Wed 29/12/2010 23:52:56
Hi everybody! I'm a relative newb, using AGS to make an adventure game for my girlfriend as the final part of a trilogy (first was webisodes, second was a movie, third is a game). Sadly I've run into a problem, and have searched the site to no avail... I hope someone more experienced can help me!!!

Anyway, there are two parts in my game where the main character acquires extra "friends" and what I thought of doing was creating moving sprites for him, and each of the friends, then changing the sprite when they are added to the "party", so he is alone for the first bit, then character two joins, then character 3 joins.

I figure there must be a script you can add to change the setting so that another Character is named as the main one, but I can't find it!

Help please!! :)

Thanks,

NeuroticNugg
Title: Re: Changing your main character sprite mid-game
Post by: Gilbert on Thu 30/12/2010 00:44:29
You can use multiple NPC characters that follow the main character (check Character.FollowCharacter() (http://www.adventuregamestudio.co.uk/manual/Character.FollowCharacter.htm) from the manual), or if you really want to (as you already said you have merged the friends' sprites with the main character), just change the View of the player when more friends are added to the party (check Character.ChangeView() (http://www.adventuregamestudio.co.uk/manual/Character.ChangeView.htm)).
Title: Re: Changing your main character sprite mid-game
Post by: Calin Leafshade on Thu 30/12/2010 00:48:03
there is also the ChangePlayerCharacter() function.
Title: Re: Changing your main character sprite mid-game
Post by: monkey0506 on Thu 30/12/2010 03:09:52
It's actually Character.SetAsPlayer() since AGS 2.7 was released. :P

But if you're just changing the view..why not use Character.ChangeView?
Title: Re: Changing your main character sprite mid-game -SOLVED
Post by: NeuroticNugg on Sun 02/01/2011 14:16:48
Thanks to all for your support, it's been a big help. I may be back with more!!!