Unintentionally Attacking Twice RPG Maker MV

Discussion in 'Javascript/Plugin Support' started by SoSick., Apr 2, 2019.

  1. SoSick.

    SoSick. Veteran Veteran

    Messages:
    218
    Likes Received:
    181
    Location:
    UK
    First Language:
    english
    Primarily Uses:
    RMMV
    Afternoon :)
    Hope someone can help me out here, im messing about with my state's and passive's but i must be doing something wrong.
    Skills that target 1 Ally which add a state ( buff ) with Yanfly State FX on them - Work fine, my attacks/ skills / magic do not repeat.
    Skills that target all Allies which add same state - Attacks / Skills / Magic all repeat! e.g Fire will cast twice, Attack will attack 2 enemies. I really dont understand why this is happening? thanks to anyone that replies

    my attack sequence
    <cast animation: 13>

    <cast animation: 13>

    <target action>

    se: Gun_Fire3, 80, 100, 60

    motion swing: user

    wait for movement

    wait: 20

    motion swing: user

    wait for movement

    wait: 20

    motion swing: user

    wait for movement

    animation 140: target

    wait for animation

    wait: 10

    action effect

    wait: 40

    </target action>

    Magic has no Sequence.
    Skill causing repeated actions
    Capture.PNG
    the state
    Capture2.PNG
     
    #1
  2. Jules98

    Jules98 Veteran Veteran

    Messages:
    304
    Likes Received:
    155
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    This is happening because skills with a scope set to 'All Enemies' or 'All Allies' use Whole Actions by default. Since you are adding Target Actions on top of the default Whole Actions, the skill appears to take effect twice.

    You can fix this by changing the Target Actions in your action sequence to Whole Actions.
     
    #2
    SoSick. and gambitben like this.
  3. gambitben

    gambitben Veteran Veteran

    Messages:
    123
    Likes Received:
    82
    First Language:
    Spanish English
    Primarily Uses:
    RMMV
    Try whole action instead of target action, that worked for me when I had this issue. Alternatively, you can use break action after action effect. Hope this helps, we'll think of something else if not :rhappy:

    Ninja'd, what Jules98 said :smile:
     
    #3
    SoSick. likes this.
  4. SoSick.

    SoSick. Veteran Veteran

    Messages:
    218
    Likes Received:
    181
    Location:
    UK
    First Language:
    english
    Primarily Uses:
    RMMV
    Thanks for the replies :)
    Changed it to whole actions and I still seem to get the problem.. :(
    @gambitben will try use break action? Where do I put this this? Only now diving head first into the battle scene xD
     
    Last edited: Apr 2, 2019
    #4
  5. shockra

    shockra Slightly Crazy Programmer Veteran

    Messages:
    402
    Likes Received:
    176
    Location:
    US
    First Language:
    English
    Primarily Uses:
    RMMV
    I think that target action needs to be cleared. By default, that's where the effect takes place unless overwritten by the notetag. Try adding an empty <target action></target action> to clear it.
     
    #5
  6. gambitben

    gambitben Veteran Veteran

    Messages:
    123
    Likes Received:
    82
    First Language:
    Spanish English
    Primarily Uses:
    RMMV
    @SoSick. Just like this:

    <cast animation: 13>

    <target action>

    se: Gun_Fire3, 80, 100, 60

    motion swing: user

    wait for movement

    wait: 20

    motion swing: user

    wait for movement

    wait: 20

    motion swing: user

    wait for movement

    animation 140: target

    wait for animation

    wait: 10

    action effect

    break action
    </target action>

    If it still doesn't work, try with whole action. It Works in mine, I doublé checked it.
     
    #6
    SoSick. likes this.
  7. SoSick.

    SoSick. Veteran Veteran

    Messages:
    218
    Likes Received:
    181
    Location:
    UK
    First Language:
    english
    Primarily Uses:
    RMMV
    @shockra i tried that pal, but no luck...the sequence doesn't even happen this way lol shocked that the <whole action> didnt work

    @gambitben this works! brilliant! thankyou all so much for trying to help me, would i be best to use <whole action> in this still though? :)
     
    #7
  8. gambitben

    gambitben Veteran Veteran

    Messages:
    123
    Likes Received:
    82
    First Language:
    Spanish English
    Primarily Uses:
    RMMV
    Glad to hear! You should be fine using target, but I'll check it and update this as soon as Steam servers decide to come back up.

    Edit: I used whole in my skill, guess is a bit more stable… but you should be fine with just target. :rhappy:
     
    Last edited: Apr 3, 2019
    #8

Share This Page