"Local" Animations and special damage formula

● ARCHIVED · READ-ONLY
Started by Manofdusk 6 posts View original ↗
  1.  I've noticed that there are 2 types of animations. "Global" which apply only once to the whole screen (such as fire breath) and "Local" which are repeated for each character (such as pierce physical)

     I have 2 instances specifically that I need to fix. I'm using the Fire Breath animation for a bomb item (which is good) but bombs can also be used in certain places outside combat (to blow up walls). However, when I play the animation, the explosion always seems to appear over the player's head. Anything I can do to make the "explosion" localized while keeping the single blast for in combat?

     the next instance has to do with a skill called 36 blade strike. It strikes 4 random enemies and repeats 9 times each. However, the animation I'm using (Slash Special 5) only plays once. Is there a way to get it to repeat multiple times?

     I have a similar skill that uses pierce physical and the animation repeats 4 times.

     Finally, I have a damage formula that is throwing an error.

     It's an attack that will instantly kill a foe on a critical hit if the target is not a boss. I've set up a state called "Boss Immunity" and have a script so that I can set it to the boss innately... so I need my formula to check if the target is a boss and if the attack is critical. If it's not a boss and is a critical, it's instant death. If it is a boss or is not a critical, it deals normal damage. Here's what I have:

    c=((a.atk*a.mdf)-b.def); b.state?(82) ? c: b.result.critical? b.add_state(1): c

    I've changed mdf to "Weapon Damage" in this game so that's why it's atk*mdf.

    State 82 is boss immunity and (naturally) State 1 is Death.

     any help would be appreciated.
  2. While I can't be 100% certain offhand, something seems off with spacing...

    Specifically, try adding a space before the colons.

    That might not be the right solution, but it's the one that pops into my head.
  3. Try:

    c = a.atk * a.mdf - b.def; if b.!state?(82) && b.result.critical? ; b.add_state(1): c; end
  4. Putting in some spaces will help you realize you've missed a ? or put it in the wrong place. When you say "throwing an error" it would be HUGELY helpful for you to actually SAY what the error is. I can only guess now, as I don't have RPG Maker in front of me.

    Code:
    c=((a.atk*a.mdf)-b.def); b.state?(82) ? c: b.result.critical? b.add_state(1): c
    should be changed to one of the following options - I just don't know if b.result.critical or b.result.critical? is correct
    Code:
    c = ((a.atk * a.mdf) - b.def); b.state?(82) ? c : b.result.critical ? b.add_state(1) : c
    Code:
    c = ((a.atk * a.mdf) - b.def); b.state?(82) ? c : b.result.critical? ? b.add_state(1) : c
    For the animation question, just copy the animation into a new slot and change the target to be the battler rather than the screen - or center rather than head, or whatever is needed to display it properly.
  5. c = ((a.atk * a.mdf) - b.def); b.state?(82) ? c : b.result.critical ? b.add_state(1) : c

     also, changing the position got it to working too. Thanks
  6. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.