Giving the option of which sprite to use for the main character. Possible?

Started by Mushroom.Lord, Thu 23/01/2014 21:37:20

Previous topic - Next topic

Mushroom.Lord

Hello,  hello~!
I won't bore you with small talk, for now.

Hopefully my topic question is clear. I'd like to know if it's possible to give the option to choose the look of the playable character, before the game begins. My idea is to give three sprite choices (for my idea, they will choose between different ethnicity's) , and depending on the choice of the sprite, I want a the family-characters connected with that choice to be affected as well.

But is this even possible? Will it take more than a beginner's knowledge to be able to pull this off?

If you've read this, thank you in advance. Hope to hear from you soon!

GlaDOSik

Of course it is possible. Make an empty room with proper GUI and buttons. Make your views with different sprites. Than use code player.ChangeView(int view); for change the view as you want.

Adeel

Yes, AGS is more than capable to perform such task. Search for 'ChangeView' in the manual, that pretty much answers your question :) .

Here's what I'd do:

1. Create three separate views containing the an outfit of the character respective in each.

2. Use a GUI or you may use a separate room (depending on your need) to display the option to choose the outfit.

3. Assign the player's selected 'outfit' view to the playable character.

And yes, based on the playable character's view, you can change the family characters view accordingly too. Use "Character.View" to change their views.

To answer your last question: Yes and No. If you don't have a programming background, then it may be difficult for you first. But in honesty, I feel that it'll not be difficult for you (if you already have some programming experience).

If you've other questions related to this problem, please feel free to ask. :)

Crimson Wizard

I think it will be easier to create three separate characters with their corresponding views set up at design time (in editor), then use "Character.SetAsPlayer()" command after player selection.
Same for family members.
This way you will even be able to set up different interactions for player/family characters without checking which sprites they are "wearing".

Adeel

Quote from: Crimson Wizard on Thu 23/01/2014 22:02:42
I think it will be easier to create three separate characters with their corresponding views set up at design time (in editor), then use "Character.SetAsPlayer()" command after player selection.

From a beginner's perspective, I agree with you. (nod) Its far easier to create three separate characters with their corresponding views and manage them than to mess with different views. :)

Khris

Actually, I'd recommend using a single character and assigning them a view depending on the player's choice.
The reason is that in dialog scripts, one should use the actual character name instead of the player pointer, at least if one might end up wanting to add voices to the game.

In every other situation it's not much of a difference; should you want to check for the ethnicity during the game, it doesn't really matter whether you compare player to a character of player.View to a view.

Adeel

By the way, WELCOME TO THE AGS FORUMS! ;-D Just noticed that this is your first post. :)

SMF spam blocked by CleanTalk