Select another actor to attack for me

Discussion in 'RPG Maker VX Ace' started by Kes, Oct 24, 2013.

  1. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,100
    Likes Received:
    10,719
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm separating this out from a question I posed in the Custom Formula thread, as it doesn't look like that is the route to achieve what I want.

    When it comes to choosing an action for Actor X, I would like to be able to use a skill (which will probably call up a common event) to select another actor from the party to attack instead of Actor X attacking.

    I know how to do this with a pre-determined choice, which can be done via the damage formula, but I don't want to be stuck with having to use only one character.  I would like to be able to choose anyone in the active party.

    If you can give suggestions, could you bear in mind that I have the scripting knowledge of an as yet unborn babe, so explanations would have to be completely idiot-proof.  And of course it may be that no script is involved - hence my posting this in the general support section at this stage.

    Thanks
     
    Last edited by a moderator: Oct 24, 2013
    #1
  2. Alexander Amnell

    Alexander Amnell Jaded Optimist Veteran

    Messages:
    3,405
    Likes Received:
    1,730
    Location:
    Zaječí
    First Language:
    English
    Primarily Uses:
    N/A
    This really isn't all that hard to accomplish (although it gets a little more complex with each actor you have) First you make the skill that the leader is going to use. Set it's scope to one enemy, and set it to play a common event but don't do anything else to it (as it isn't the skill the ally is going to use on the enemy). Then you set up your common event, I whipped this up real quick just as a sort of example event, it only checks for two characters but it shows the concept...

    [​IMG]

    [​IMG]
    Of course change the skill performed to whatever you want the surrogate actor to perform. Like I said if you have like 20+ actors to choose from than this method may not work to well but 4-6 or so it should be pretty easy to implement.
     
    Last edited by a moderator: Oct 24, 2013
    #2
  3. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,100
    Likes Received:
    10,719
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thank you very much.  I shan't be able to test it now until tomorrow evening, but looking at it, I think it's going to be straightforward enough as I will only have a choice of 6 other actors.
     
    #3
  4. Alexander Amnell

    Alexander Amnell Jaded Optimist Veteran

    Messages:
    3,405
    Likes Received:
    1,730
    Location:
    Zaječí
    First Language:
    English
    Primarily Uses:
    N/A
    Sure, glad to help... one problem though... umm, ignore my last post. It was rushed and I didn't test it, also it doesn't work... this does though:

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
    I had the right concept last time but I was using the variables the wrong way, using the first method it would only work if member#2=actor#2 and\or member#3=actor#3. New method checks if actor number 2 and 3 = member slot 2-4 or not (with slot 1 assumed to be occupied by party leader)
     
    #4

Share This Page