Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help with Animations and walking sprites

In the midst of making some battle animations like explosions and the like, i found a problem that i dont know how to solve. Maybe the answer is obvious, but here it goes. I need to make magic circles around my characters when they cast (i am using a side scrolling battle system), but i dont know how to put animations under my character sprites. Is there a script involved in this that i could use or is the answer even simpler?

My second question has to do with the walking sprite. When you use the regular walking setup, and you push a direction it cycles through the postures in the animation and when you release the direction it goes back to the "still" pose. What i want to make my character do is to have that "stand still frame" active, and when you press a direction it cycles through a separate set of running frames, and when you stop it goes back to the "stand still Frame". My problem is that if i make just running drawings on the frames, when he stands still it looks ridiculous because hes leaning forwards frozen in the middle of a run. How would i fix this? is a changed up script needed?

thank you for your help.
 
Try this:
Code:
class RPG::Animation
  Lower_Animations = []
  def is_lower_animation?
    return Lower_Animations.include?(@id)
  end
end

class RPG::Sprite
  alias_method :seph_loweranimationz_rpgspr_anim,  :animation
  alias_method :seph_loweranimationz_rpgspr_lanim, :loop_animation
  def animation(animation, hit)
    seph_loweranimationz_rpgspr_anim(animation, hit)
    if animation.is_lower_animation? && @_animation_sprites != nil
      @_animation_sprites.each {|s| s.z -= 1}
    end
  end
  def loop_animation(animation)
    seph_loweranimationz_rpgspr_lanim(animation)
    if animation.is_lower_animation? && @_loop_animation_sprites != nil
      @_loop_animation_sprites.each {|s| s.z -= 1}
    end
  end
end

Just fill this Lower_Animations = [] with your animations that will be below your main sprite. So if your Magic Circle animation is id 5, have Lower_Animations = [5]. If you want to add like animation 7, you would have Lower_Animations = [5, 7]
 
um.. first of all would i put his script under a new script tab, and if so, when i do and i enter a battle (having set an animation id in the brackets) it sais "NoMehodError occurred. Undefined Method 'Is_lower_animation?' for nil:NilClass." What does this mean and what did i do wrong?

By the way thanks for putting in the time to help. (also i noticed that this means that the animation will either be above or below, is there a way to have both in the same animation or is that too much)
 

Anonymous

Guest

Yep, sorry it is in French, which is actually pity because you have loads of useful new event command (find path, in contact with, in range, picture etc etc)
Well actually it is very simple, you just need to copy paste the script linked (above main as usual) and it would work as described above
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top