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.

Animations

I need to know how to play animations that I've made in the database through script in my own custom scene.

This is what I'm trying

@Fighter_01 = animation("Sword", 0).new


I've already defined @Fighter01 as a sprite.new, so what am I doing wrong?

Please Help :)
 
maybe you would appreciate the bump :)

if you know then i could learn from your mistake and know 2 :)
not that i'd likely ya know...be able to understand the explanation the leet
scripters will post.
 
haven't tried yet but, try this:
Code:
animation = $data_animations[animation_id]
animation(animation, true)
Where animation_id is the id of the desired animation in database.

EDIT: Forget it if you're going to use it out of battle.
 
Make sure you are defining it as a RPG::Sprite, and not regular sprite. The RPG::Sprite class has the animation handeling.

Code:
v = Viewport.new(x, y, width, height)
your_sprite = RPG::Sprite.new(v)
a = $data_animations[animation_id]
your_sprite.animation(a, animation_hit)
 
Thanks I'll try that, but just wandering do i have to put the viewport or can i just put

v.x = n
v.y = n

Maybe not even this but just in case
v.height = n
v.width = n


I just tried it and it makes the sound but does not show the animation
can you tell me what i did wrong

I used this to active the animation

v = Viewport.new(250, 250, 21, 25)
@Fighter_Pic_01 = RPG::Sprite.new(v)
@Fighter_Pic_01.bitmap = RPG::Cache.picture("Battler_A1")

a = $data_animations[1]
@Fighter_Pic_01.animation(a, true)
 
Are you updating your @Fighter_Pic_01 sprite? The update method must be called, or it will not update the animations.

Secondly

v = Viewport.new(250, 250, 21, 25)

You are creating basically a square at 250, 250 that is 21 by 25 pixels big. The sprite will only be displayed in that region, as the animation.
 
Since this topic is about animation I decided to put my question here since I dont think my question is GOOD enough for a new topic.. here it goes..

Is there a way to change the default resolution used by animations? I think the default animations resolution only takes up half of the screen thats why the lighting animation when used on a side view battle system doest look good.. because the Top/ upper part of the animaiton looks like it has been cut out..

- It would be nice if the animations resolution is equal to the stretched battlebacks
resolution.. so is there a way? or It needs a very complex script?

lasty.. does anyone here know where I can find the multi animation script by sephirothspawn?
the thread? I would like to know what that script does..
 
I am looking into a way to getting a bigger image out of animations that will adjust the image to fit within the viewport size. I know exactly where to look, so it shouldn't be a big problem.

As for the Multiple Animations, I haven't released it yet. I just did it for Trickster's RTAB. You can get the script from his demo. It my be in my beta as well but I don't remember. It just allows you to play multiple animations at the same time on a sprite, rather than overwriting your old one with a new one.
 
SephirothSpawn;188912 said:
I am looking into a way to getting a bigger image out of animations that will adjust the image to fit within the viewport size. I know exactly where to look, so it shouldn't be a big problem.

As for the Multiple Animations, I haven't released it yet. I just did it for Trickster's RTAB. You can get the script from his demo. It my be in my beta as well but I don't remember. It just allows you to play multiple animations at the same time on a sprite, rather than overwriting your old one with a new one.

Thanks for that.. got to try that one.. 8-)
 

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