[solved] making enemy untargetable under certain conditions

Discussion in 'JS Plugin Requests' started by Kchorrex2012, Jul 26, 2017.

  1. Kchorrex2012

    Kchorrex2012 Villager Member

    Messages:
    15
    Likes Received:
    1
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Hi everyone
    I've been looking for a way to keep some boss enemies in battle after they are killed in order to have dialogue and cutscenes
    play after they're defeated and not make it seem disjointed (think of the first time you defeat Magus in CT, he doesn't just vanish like a regular enemy or boss). So I came across this tip of setting those enemies as resistant to death, and then set up battle conditions that are triggered when their HP is depleted (never thought death resist would be useful, really). As for keeping them from attacking once they're at 0 HP, that can be set up in each enemy's moveset window or maybe with a special state. So far so good, but since it's more than one enemy, I'd like to make the enemy that dies first untargetable so that the player can't keep attacking them and wasting resources.
    Any help? Thanks
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,707
    Likes Received:
    6,600
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    This is not possible without a plugin, because the default can't restrict player decisions.

    I've moved this thread to Plugin Request. Please be sure to post your threads in the correct forum next time. Thank you.


    But I think such a plugin already exist from Tsukihime, check her blog.
     
    #2
  3. Kchorrex2012

    Kchorrex2012 Villager Member

    Messages:
    15
    Likes Received:
    1
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    oh, my bad, sorry U-_-
    Actually I was expecting a plugin solution, should've added that. I'll check out Tsukihime's site though I don't know if they're compatible with Yanfly's plugins, I'm using a ton of them.
     
    #3
  4. Naveed

    Naveed Veteran Veteran

    Messages:
    314
    Likes Received:
    144
    First Language:
    English
    Primarily Uses:
    RMMV
    You should take a look at Yanfly's Selection Control (which requires Yanfly's Target Core). It should have what you're looking for.
     
    #4
  5. Kchorrex2012

    Kchorrex2012 Villager Member

    Messages:
    15
    Likes Received:
    1
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Ok so I tried selection control and was able to come up with a solution with battle events. Basically I set up one event for each enemy to add a state at 0 HP. This state makes the enemy unable to move and has the notetag <cannot select: all>, so it cannot attack nor be targeted. Another event aborts the battle when all enemies are with this state. The only downside (not related to the plugin, actually) is that when you abort the battle the player doesn't receive exp or money (doesn't count as winning), didn't think of that XD.
    Tagging this as solved.
    Thanks a lot Naveed :D
     
    #5

Share This Page