Edit: I might have posted in the wrong forum. If so please move this to the script help section thanks!
In scripts that draw character face's from the string of the filename, there's one serious problem. When you change the character names, the filename of the face picture will Also need to change or it will not call the face picture and return an error & end game. Is there a good solution to this? I have tried many things with scripts but they all failed.
The script to call face filenames is this:
bitmap = RPG::Cache.face(actor.name, actor.character_hue)
I tried many stuff including this which works in theory but does not because it needs to refresh and I dont know how to do that correctly.
I put $game_variables[25] = $data_actors[1].name in a script after you input the Player's name. Actor[1] is the player.
And I tried this code in the def draw_actor_face script. But it doesn't refresh obviously and only defines it once, so all the character's faces are now the player's
What I probably need is something to get the cached indexes of the characters and then output those instead as strings. I tried something like this but it also crashed with errors :
@actor_id_no = $data_actors[@actor_id]
bitmap = RPG::Cache.face(@actor_id_no, actor.character_hue)
If you know anything please help thanks
In scripts that draw character face's from the string of the filename, there's one serious problem. When you change the character names, the filename of the face picture will Also need to change or it will not call the face picture and return an error & end game. Is there a good solution to this? I have tried many things with scripts but they all failed.
The script to call face filenames is this:
bitmap = RPG::Cache.face(actor.name, actor.character_hue)
I tried many stuff including this which works in theory but does not because it needs to refresh and I dont know how to do that correctly.
I put $game_variables[25] = $data_actors[1].name in a script after you input the Player's name. Actor[1] is the player.
And I tried this code in the def draw_actor_face script. But it doesn't refresh obviously and only defines it once, so all the character's faces are now the player's
Code:
if actor_name = $game_variables[25]
bitmap = RPG::Cache.face("player", actor.character_hue)
else
bitmap = RPG::Cache.face(actor.name, actor.character_hue)
end
What I probably need is something to get the cached indexes of the characters and then output those instead as strings. I tried something like this but it also crashed with errors :
@actor_id_no = $data_actors[@actor_id]
bitmap = RPG::Cache.face(@actor_id_no, actor.character_hue)
If you know anything please help thanks