HOW DO I BLEND BETWEEN ANIMATIONS?

Posts

Pages: 1
Hey all. I'm trying to make it so the player can press a button and swing their weapon. Not sure if I'm going about it the right way. I've included a gif and event code. I'm using rpg maker vx ace.

The way I'm doing it feels awkward. I'm turning the player sprite transparent while playing a battle attack animation on top of the player scaled down to 20%.Currently, I'm not sure how to blend animations properly. As you can see, the player turns invisible for a second. Anyone know a better way to do this?

This is only a test, too. Then I need to think about specific animations for directions and how to get an enemy react to getting hit. The second part seems like it would be difficult. Can someone get me started on how to do the second? Like, what's the event to make an event happen a tile away from the player - in the direction they're looking? Thanks everyone!

https://cdn.discordapp.com/attachments/452615345736384522/1075616597730922536/swingTest.gif

https://cdn.discordapp.com/attachments/452615345736384522/1075617211831562351/image.png
Marrend
Guardian of the Description Thread
21781
I'm not so sure about the first issue, but, the second issue? I kinda do this with the Wand of Blasting mechanic that I originated in this game.

It might be a little much to get into with a forum post, but, the general idea I used there is that there's effectively an array of event IDs that can be interacted with. Such events are generally considered obstructions that cannot be moved through. So, when the bullet stops, it makes a virtual move forward one step to check if it's colliding with an event, and if so, then checks to see if the event ID is one it can interact with.

Now, I'll grant that the Wand of Blasting is a ranged attack and moves until it hits an obstruction before it acts, or fails to do so. Your mechanic, however, is a melee attack, and only moves one tile from the player before it acts, or fails to do so. However, I do kinda feel the concepts are similar.

*Edit: Here's one of the tools I use for the WoB.
# Determines if an event at (x, y) is actionable. If so, returns the ID of the
# event. 
def is_actionable?(x, y)
  i = 0
  while i < $actions.size
    # Cycles through the action array to see if an actionable event was 
    # activated.
    event_id = $actions[i]
    if event_id != 0
      # If the value of event_id is was set to 0 because an actionable event
      # was removed, the next check would throw an exception.
      if $game_map.events[event_id].pos?(x, y) == true
        return event_id
      end
    end
    i += 1
  end
  return 0
end

Though, in later editions of the code, there is a `$game_map.actions` variable used/made, instead of using a separate `$actions` variable.
Pages: 1