Menu Headshots

My main Artist was wondering if it's possible to have the headshots change depending on their HP. Is that actually possible in VX Ace?
It is possible, if you only need it in the menu (which is only accessible from the map scene), there is no need for a script. You can have a parallel process running in your map that checks if a certain actor health is lower than a certain percentage and changes the face accordingly.
Depending on how you implement the parallel process, it can be more or less efficient, but in the end the general concept stays the same.
It is possible, if you only need it in the menu (which is only accessible from the map scene), there is no need for a script. You can have a parallel process running in your map that checks if a certain actor health is lower than a certain percentage and changes the face accordingly.
Depending on how you implement the parallel process, it can be more or less efficient, but in the end the general concept stays the same.
I have 3 faces per character, is there a way for me to add more than one variable to a conditional Branch? Because I want to change to the second image when their health is less than or equal to 75% but Greater than 50%
Code:
Conditional Branch: Health > 75
  use face 1
Else
  Conditional Branch: Health > 50
    use face 2
  Else
    (health <= 50)
    use face 3
  End
End
Code:
Conditional Branch: Health > 75
  use face 1
Else
  Conditional Branch: Health > 50
    use face 2
  Else
    (health <= 50)
    use face 3
  End
End
I applied the code, however if the character's hp is higher than 100 (I changed it to 400 to test it), the image will not change if a character has a certain percentage of health left.
You can use the script function in the conditional branch and use
Code:
$game_actors[actor_id_goes_here].hp_rate > 0.75
and
Code:
$game_actors[actor_id_goes_here].hp_rate > 0.5
in your event.
75 and 50 are meant to be percentages, not fixed amounts, as per your post. 400% is still only going to show the same as 100%
75 and 50 are meant to be percentages, not fixed amounts, as per your post. 400% is still only going to show the same as 100%
Confused on how to use it;;
@Nyuku just do this:
You can use the script function in the conditional branch
When you enter a Conditional Branch command in the event contents list, the window where you configure the condition has different options. One of them is "script". Just use the two script calls I provided and you will be able to automatically check the hp rate of your actor.
@Nyuku just do this:

When you enter a Conditional Branch command in the event contents list, the window where you configure the condition has different options. One of them is "script". Just use the two script calls I provided and you will be able to automatically check the hp rate of your actor.
Would the ID be the character Name? or the number?
ID is the number. It is the only way to access your actor directly. Using the name would require a loop (and thus would be much slower).
ID is the number. It is the only way to access your actor directly. Using the name would require a loop (and thus would be much slower).
I'll try your suggestion
Should you encounter any difficulty, post a screenshot of your event and we will be able to provide better support.
Should you encounter any difficulty, post a screenshot of your event and we will be able to provide better support.
It worked! Thank you so Much! I'll close the thread now.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/menu-headshots.110498/