[Ace] Help with Hime's Formula Effects

Discussion in 'RGSSx Script Support' started by Vis_Mage, Oct 20, 2018.

  1. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Howdy!

    I'm hoping someone with a little bit of scripting knowledge could help me creating a skill effect using Hime's Formula Effects script.

    What I'm hoping to create is a skill that is set up like:
    If target has state 10
    set_variable[1] = 3
    elseif target has state 11
    set_variable[1] = 2
    else
    set_variable[1] = 1

    I hope this makes sense. By all means, let me know if you'd like me to try and explain it differently.

    Thank you!
     
    #1
  2. A-Moonless-Night

    A-Moonless-Night WINTER IS COMING Veteran

    Messages:
    505
    Likes Received:
    360
    Location:
    New Zealand
    First Language:
    English
    Primarily Uses:
    RMVXA
    I feel like this is the neatest way:
    Code:
    v[1] = b.state?(10) ? 3 : b.state?(11) ? 2 : 1
    but if that doesn't work, try:
    Code:
    b.state?(10) ? v[1] = 3 : b.state?(11) ? v[1] = 2 : v[1] = 1
    If that doesn't work, try replacing the v with $game_variables.
     
    #2
    Vis_Mage likes this.
  3. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Works like a charm, thanks a bunch! :)
     
    #3
    A-Moonless-Night likes this.

Share This Page