In the beginning of THIS project, I have 16 different class graphics (One for each class, male or female)
and 4 actors choosing one class each.
I know how to change their graphic when they die. (I am using a ghost sprite for all of them)
If they didn't all have so many choices, I could change their graphic back without having to make an event with SOOOOOOOOO many conditional branches.
It took long enough to write the event to have a party of four choose from 16 options and setting all of their graphics accordingly.
What I need is a simple way to save their chosen graphic before they die (switching it to the 'ghost'). Then using that saved info to call back their original graphic. I cannot script, and I did look at some things here and elsewhere, but with no help. Each choice I gave them resulted in another variable that had to be set. I think I've tried everything...
It was much easier when I had set characters, rather than a final fantasy 1 character screen with eight dragon quest jobs available.... grr
multiple choices for actor graphic leads to 2 mny cond branch
● ARCHIVED · READ-ONLY
-
-
edit Nvm Im stupid
-
@kiedisticelixer
If I am reading the OP correctly, the problem is changing back from ghost... not changing to ghost.
@Dogprincess
Are you wanting this to happen through event? Does it have to occur during battle as well?
The explanation I have below will use an event. If it needs to be done in battle that is also possible, but requires the use of Battle Troop Events or a script that can make the event apply universally like Yanfly's Base Troop Events.
Hope that helps!SpoilerThis can be done with some organization. Basically the goal is to organize your sprite sheets and face set to correspond to a variable. Here is a step by step:
For this example. Let's say your first 2 heroes are named Eric & Alice. Let's also say Class 0 is warrior, Class 1 is priest, Class 2 is archer.
1. Reorganize Sprite Sheets and Face Set (assuming both change with class)
What you want to do is make it so that they are in a specific order. You will need to make a new sprite sheet with ONLY Eric on it, and order the sprites in the same order as the class numbering system. So the first sprite on the sheet will be his Warrior sprite, then his Priest sprite, then finally his Archer sprite. Similarly do the same with his face set (this only works for face set if you have different faces for each class, and you don't have full expression sets)
2. Assign a Job Class Variable during the Job Assignment event.
When the player picks out the job. Have a variable that is permanently assigned and not used elsewhere (unless the player can change classes later in the game)
Let's call the variables: EricJob & AliceJob. If the player selects Eric to be an Archer and Alice to be a Warrior. You will set EricJob = 2, AliceJob = 0
3. Use a single condition to see if Eric/Alice has job variable 0-7 or 8-15.
Condition: EricJob <= 7
This will do the event processing for the first 8 classes
else
This will do the event processing for the second 8 classes.
end
4.. When a player is revived event the graphic change:
For classes 0-7 use this:
hero = $game_actors[x]hero.set_graphic("Eric_Sprite", $game_variables[y], "Eric_Face", $game_variables[y])$game_player.refreshor use this for classes 8-15:
hero = $game_actors[x]hero.set_graphic("Eric_Sprite", ($game_variables[y] - 8), "Eric_Face", ($game_variables[y] - 8))$game_player.refreshx = Eric's Actor ID
y = EricJob Variable ID
Eric_Sprite is the file name of Eric's spritesheet that contains job options.
Eric_Face is the file name of Eric's face sheet that contains job options..
~ Dinhbat -
Thank you for your response, Dinhbat. You are correct. I am trying to change the graphic back to their chosen class sprite. I have a parallel process event on all maps that changes the actor graphic to a ghost when status = death. I will try to implement this script into a common event tied to that parallel process. It will take some time to figure out, but I will be sure to thank you properly. 8)
-
I tried to use this in many places, after I continually got error messages. I appreciate your help! But I am going to complete this project using conditional branches and variables. I did rearrange my actor graphics. That helps shorten the time this will take. I am almost 75% complete in character selection process and revival events.
-
whew. did what I had to. I wanted to be able to change classes and keep the learned skills, but I am finding that to be a whole lot more work. Oh well.
You may close this post. Thanks 8)