The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: jamesrichards on November 29, 2007, 09:38:26 PM

Title: [RESOLVED]Possible use of variables to keep track of which sprite your character
Post by: jamesrichards on November 29, 2007, 09:38:26 PM
I've tried to make the subject as clear as possible, but it would've taken to long.

One of the things I'm working on for my game invovles a kind of character generation process.  You walk up to a standing character, choosing how it will look at the beginning of the game.  So far, it seems to work, right now you only get to select your gender, sprite and name.  Some point int he game I will be making it to where you are transported somewhere, and swicth to a different sprite, alsmot making you someone else.

My question is... How do I make to where the player comes back, to the original world, and use the same sprite the player selected at the beginning fo the game?  I've tried playing with variables, and only succeeeded in confusing myself.

Has anyone used this kind of method in there game and can post a demo where I can peek at the source, or post a smaple source?

A link to a very good resource on variables would also be appreciated.  So far all the links I've clicked on don't seem to do it for me.

Thank you for your time.

Edit:  Oh, and it's for RPRG Maker XP
Title: Re: Possible use of variables to keep track of which sprite your character has (help
Post by: &&&&&&&&&&&&& on November 29, 2007, 09:49:28 PM
 ???

Just make three (or two) variables.

variable 1. Gender
variable 2. Sprite

3. Does the name change?
Title: Re: Possible use of variables to keep track of which sprite your character has (help
Post by: jamesrichards on November 29, 2007, 10:07:33 PM
Nope.  name does not change.

I realize I did not explain enough.

I used a tree stump as a place holder for now, and created a touchable event on it, that does my animation (thanks to oterhs to make that work), PC dissapears, and appears ont he new map (also with flashy animation) but looks vastly different.  (all this on the event)

PC walks around for a while, then touches a rock and in that rocks event, right now it does the same things, but since I can't figure it out yet, it uses the sprite for Aluxes (stock character setup).

As you have stated...do I need to place the variable checks in the 'return' teleport to put player back to chosen sprite?

???
I can't seem to explain well enough...
Title: Re: Possible use of variables to keep track of which sprite your character has (help
Post by: &&&&&&&&&&&&& on November 29, 2007, 10:36:23 PM
 ???
Title: Re: Possible use of variables to keep track of which sprite your character has (help
Post by: jamesrichards on November 29, 2007, 11:22:30 PM
I think I found something.  While waiting for another reply, I played around with the branching statements, ceated a common event, checking for a vaiable of 1-10 assigned to the player for shich sprite, and 0-1 for which gender.  So, I basically have somethign like yours, but it's about 10 branches, with no answer to 'ELSE' (allowing it just to get to the next one in sequence) all buried into another branch statement, this one just checking for variable gender 0 or 1.  So I have 20 open branches... 10 for male, 10 for female with each IF assigned to changing the sprite of the character...  I think it'll work...

Example: (https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg227.imageshack.us%2Fimg227%2F3492%2Fpcgenderspritecheckxa8.th.png&hash=f20c916df5fe471114a83e9f152b49658b8196e2) (http://img227.imageshack.us/my.php?image=pcgenderspritecheckxa8.png)

The only problem I think will be later on in development this may throw a monkey wrench into it all...  Any ideas on further doing this?  Like maybe assigning a variable of 101 for the first male sprite then 201 for the first female sprite?  cruch it up into something smaller?
Title: Re: Possible use of variables to keep track of which sprite your character has (help
Post by: jamesrichards on December 03, 2007, 06:37:41 PM
I pretty much have thos covered myself.  No answer to the last post so...  I guess this is resolved.