How do I force Actor ID to use an action?

Discussion in 'Javascript/Plugin Support' started by thebootknifer, Nov 25, 2018.

Thread Status:
Not open for further replies.
  1. thebootknifer

    thebootknifer Villager Member

    Messages:
    13
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    I have a small problem with the skills I'm creating.

    Currently I force battler 0 to do an action when a state ends using Yanfly's Buffstates plugins.

    <Custom Remove Effect>
    $gameParty.members()[0].forceAction(46, 1);
    BattleManager.forceAction($gameParty.members()[0]);
    </Custom Remove Effect>

    My problem is, is that actor will not be battler 0 throughout the game. She will be moved around, which will cause these states to fail to force the attack.

    Is there a way for it to check for Actor ID two, and which position she is in? And then insert that battler number into this code? I imagine I would have to create a variable to find her battle position and then place that var where the "0"'s are. I do not know how to do that properly.

    Thank you!
     
    #1
  2. thebootknifer

    thebootknifer Villager Member

    Messages:
    13
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Wowww I think I figured it out after posting this.

    <Custom Remove Effect>
    $gameActors.actor(2).forceAction(46, 1);
    BattleManager.forceAction($gameActors.actor(2));
    </Custom Remove Effect>

    Wasted thread, Please delete. Sorry.
     
    #2
  3. MushroomCake28

    MushroomCake28 Great Sorcerer Ainz Ooal Gown-sama Veteran

    Messages:
    1,328
    Likes Received:
    2,376
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    No need to delete. If someone searches for the same thing they will find the answer.
     
    #3
  4. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    4,999
    Likes Received:
    3,892
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP
    We don't delete threads, but I'll go ahead and close this one.
     
    #4
Thread Status:
Not open for further replies.

Share This Page