[RMVXAce] Trying to ensure that only the Main Character can be attacked.

● ARCHIVED · READ-ONLY
Started by Rhaeami 4 posts View original ↗
  1. In the game project I'm working on, combat revolves around 1 Main Character and various temporary helpers that they can summon into a fight.  How I got that part to work is another story, but what matters is this:  The player can only see - and only cares about - the main character's HP, no one else's.

    Of course, this means that I want enemies to only attack the Main Character.  So far, I've been doing this with common event calls.  An enemy will use a skill, that skill will call a common event, and that common event will manually adjust the main character's HP appropriately.  This all works perfectly for most things, even special skills involving states and such, but it's turned out to have a nasty side-effect related to HP itself:  Common events don't have immediate effect on the HP bar in the middle of an attack round.  I can change the player's HP, but the actual HP bar won't update right away, often still appearing full or unchanged until the end of the combat round, or until a second enemy attacks.  Obviously, this will not do!

    So, I'm hoping for some ideas as to how to make *only* a single, specific actor targetable by enemy attacks.  I've recently come across information about the game having a built-in "threat" stat (TGR, I think?), but it still involves some randomness, and I'm not sure how to tweak the scripts to make it more... predictable.

    Any advice or ideas are appreciated, thank you.
  2. Yes, TGR is the target rate - and you need no scripts to tweak it.


    Add features to all actors to change the SP-parameter TGR.


    If you drop an actors TGR to 0% then that actor will not be targeted.


    The only randomness is that when more than one actor has an TGR >0%, the TGR will affect the probability of that actor being attacked, and the target is selected more or less random based on that probability.


    If only one actor has a TGR > 0%, then there is no randomness remaining.
  3. Aha, that seems to work perfectly!  Assuming nothing goes wrong in the future, I think that solves all of my problems.  Thank you very much. :cutesmile:
  4. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.