Enemy Transform with Item

Discussion in 'RPG Maker MV' started by DaneReid, Dec 30, 2017.

  1. DaneReid

    DaneReid Musician Veteran

    Messages:
    88
    Likes Received:
    5
    Location:
    USA
    I'm trying to make an enemy transform to another enemy by using an Item. So far I'm able to get it to work with one enemy, but if there is two of the same enemies in the battle, that's where I run into trouble. How can I have an item transform each individual enemy?


    Here's what I'm doing incase you need to know:
    I'm trying to make unique ways to defeat enemies. For example, I have a slime enemy that needs to turn into a solid so you can attack it. So what did so far is I made a state, which the slime can be in when this item is used on them. I also made a common event (this is where specifically I am having trouble) to where I added an "Enemy Transform" event command and choosing " Enemy #1 ?" and transforming them into another enemy (being a different color slime indicating that it is now solid). I add both the State and the Common Event to the Items "Effect" Section. By doing that I am able to transform "Enemy #1" which is the slime in liquid form, into a solid form. But If I use the same item on another enemy, they will be in that state, but won't transform (reason being in the Common Events I only chose for Enemy #1 to transform) but If I add Enemy #1 and #2 transform on the Common Event, when I use the item on one enemy, they both transform! There has to be a way where I can transform them individually.
     
    #1
  2. isyrium

    isyrium Veteran Veteran

    Messages:
    69
    Likes Received:
    19
    First Language:
    English
    Primarily Uses:
    RMMV
    The easiest way I can think of doing this would be to have it set a blank state on the enemy that you want transformed and have a common event check for if the enemy has the blank state. Then set it to give that enemy the transformed state and have it remove the blank state so it doesn't interfere with the other enemies.
    Sorry if I didn't explain that too well but I would be glad to set up a common event page and screenshot it for you as an example if your having troubles. It's a little bit of work though.
    Hope that helps! ^^
     
    #2
  3. DaneReid

    DaneReid Musician Veteran

    Messages:
    88
    Likes Received:
    5
    Location:
    USA
    If you don't mind I'd like to see a screenshot of your example. I tried doing what you said and am getting the same results. I'm thinking that it may because I'm doing what you said wrong DX I appreciate your help!

    EDIT: I figured it out! You're idea actually worked! Thank you so much!
     
    Last edited: Dec 30, 2017
    #3
    isyrium likes this.
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,806
    Likes Received:
    11,511
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    It would be using the item to apply a state to the target. Then in the common event, you would check if enemy 1 has that state, and if so, do the transform on enemy 1, and remove the state from enemy 1. Then copy/paste that block another 7 times, and change each one so you're doing enemy 2 in the second block, enemy 3 in the third block, and so on. You are checking 8 different enemies for the state, and whenever you find one that has the state, you're transforming THAT enemy.

    This could be an issue if you then use the same item on an already-transformed enemy. It might try to transform them again, which would probably not DO anything, but might display a message.
     
    #4
    DaneReid likes this.
  5. isyrium

    isyrium Veteran Veteran

    Messages:
    69
    Likes Received:
    19
    First Language:
    English
    Primarily Uses:
    RMMV
    Screenshot: https://ibb.co/dRSfEw
    its pretty simple. let me know if you still have trouble and I'll try to assist you more.

    Edit: Oh I just saw your edit.. haha glad it worked. good luck on the game!
     
    #5
    DaneReid likes this.
  6. DaneReid

    DaneReid Musician Veteran

    Messages:
    88
    Likes Received:
    5
    Location:
    USA
    Yes, that last part is exactly what happens. Is there a way to display a message saying that that enemy has already been effected?
     
    #6
  7. isyrium

    isyrium Veteran Veteran

    Messages:
    69
    Likes Received:
    19
    First Language:
    English
    Primarily Uses:
    RMMV
    You could set more Conditional Branches checking for if the enemy has the transformation state and have a message appear using the show text event. If you don't want the transformation state to re-apply then you can create conditional branches checking for the transformation state and have an else branch so that if they aren't already affected then they can be by using the first conditional branches you used before.
     
    Last edited: Dec 30, 2017
    #7

Share This Page