Untargetable State

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

This script allows you to create a state that prevents you from targeting a battler. When the state is applied, the battler cannot be targeted or affected by any skills or items.

untargetablestate1
(animation not included)
Download

Script: download here

Installation

Place this script below Materials and above Main

Usage

In the configuration, enter the ID’s of all states that should have the
untargetable property

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

12 Responses

  1. Azurezero says:

    I wonder if it would be possible to request a compatability patch with CP’s battle engine.
    im using the xp portraits battle view and i thought this script might help me fix a problem.
    when the script is above the battle engine, the untargetable state doesnt work and the game crashes when i try to use an item on them
    when the script is below the battle engine, the state does work, but the portrait highlighted is still the 2nd character (when the 3rd character is there) and the game still crashes when the item is used even though its targetting a different person

    Script ‘cp battle engine’ line 445: ArgumentError occurred.
    comparison of String with 0 failed

    apparently the crash happens even if the state is not applied when a potion is used.

  2. Wavelength says:

    Hi there, Hime! Figured I’d give you a little assist on a bugfix here – your actor_index method is returning an actor name rather than a number, which can cause the script to crash (when, for example, you try to use an item on an ally). I got it to work by replacing “$game_party.targetable_members[@index].name” with “$game_party.targetable_members[@index].id”, but I’d also recommend thorough testing after such a fix as I think I also noticed items being used on the wrong party member sometimes (although this second part might have been an incompatibility with another script I was using).

    Hope you are doing well, and that you return to plugin-making soon! 🙂

    • Hime says:

      I’m looking at the script and I don’t understand why it was written that way lol

      • Anonymous says:

        That does prevent the script from crashing, but there’s another bug. If i have a party consisting of actor 2 and 3, choose to use an item on actor 2, it is used on actor 3. I think that’s because actor 2 is the first in the party but its database id is 2, however I don’t know how to fix that…

  3. Symphonia says:

    I don’t know if you still help with VX ACE scripts but, I found an interesting bug.

    Whenever I have this script installed, the enemies can no longer revive each other. Tested this in a clean project and the same thing happens. Just upright doesn’t work. I assume they become untargetable on death?

    • Hime says:

      I looked at the script and it looks like it is hardcoded to not allow an enemy to be targeted if it’s dead.

      You could probably just delete line 103

  4. RogueDeus says:

    For those using Ace Battle Engine, Hime has provided a Compatibility Patch.

    Find it at the bottom of this issue page. https://github.com/Hime-Works/Requests/issues/14

  5. Can it be applied to an ally to avoid enemy targets someone?

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax