Controlling variable for damage formula during use of skill

Discussion in 'RPG Maker VX Ace' started by CWells, Apr 5, 2014.

  1. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    How can I create a charge skill in which the player controls how much is spent for the attack? I suspect this will be using a variable?

    If I have a cannon in which character has max mp of 90 and the damage formula is based on how much the charge is, in this case up to 90 * 10 For 900 damage. What's the trick? :)
     
    #1
  2. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,211
    Likes Received:
    2,715
    Location:
    Philippines
    First Language:
    Tagalog
    well, you would need to intercept the skill usage part in order to have another user input before damage is dealt... or intercept the skill selection so that after the skill it selected, it pops up the charge window first...


    anyway, you can do like a common event that uses a number input window then use the common event to handle the damage and animation too... basically, all the skill will do is to run the common event (you might need to use the damage formula bar to set a variable to the target though)
     
    #2
  3. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    I see, so the skill applied to the actor will call up the common event, there I make a selection and have it call up a skill that plays out the variable to target. Okay
     
    #3
  4. Zoltor

    Zoltor Veteran Veteran

    Messages:
    1,550
    Likes Received:
    206
    First Language:
    English
    Yea I'm pretty sure this can easily be done by way of a common event. Think of a base dmg amount(in your head), then put input number, then run whatever calculation(however you want the damage calculated) off of the variable tied to the input number, change enemy hp based on the newly calculated variable.
     
    #4
  5. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    It's coming out well but I am having a small problem with the MP cost. Even if I put in a small number for the charge like 8, I either get the skill being cast for free or it drains ALL my MP. See the event:

    I must be mixing something up or forgetting something.

    [​IMG]
     
    #5
  6. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,211
    Likes Received:
    2,715
    Location:
    Philippines
    First Language:
    Tagalog
    well, you're subtracting the actor's mp from his mp...


    look at that


    Change variables [25] => Test's MP #This is the actor's MP


    Change parameters => Test's MP - Variable[25] #You reduced MP by variable 25 which is also the actor's MP
     
    Last edited by a moderator: Apr 5, 2014
    #6
  7. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    Yeah, I just caught the error after of course, turning off my computer -_-

    I fixed it just now. And changed the subtraction from the mp variable to the charge variable(big blast) as it should be.
     
    #7

Share This Page