Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Animated sprite

Author
Message
zeddex2
17
Years of Service
User Offline
Joined: 4th Mar 2007
Location:
Posted: 9th Nov 2008 03:13
Hi everyone.

I'm trying to figure if its possible to create an animated sprite and add anothere animated sprite to it ( like a player with a sword, the player as an animation without a sword but you add a sword to the animation)

This way, it would be easyer to create sprite with different sword.

And How is possible when you have a keystate() to ask him to finish the animation.



I'm using this for my sword attack. but If I stop pressing my key before the animation is finish, the animation stop in the middle.

Tks a lot for your help

If you can, I can!
zeddex2
17
Years of Service
User Offline
Joined: 4th Mar 2007
Location:
Posted: 9th Nov 2008 16:51
Tks a lot for the information.

By the way, I'm sure its possible to do my animation better.

At this moment I use 5 different sprite for 5 diferent animation on the same charactere.

sprite 1 = mouvement up
sprite 2 = mouvement down
sprite 3 = etc... ( and 5 is my sword attack)

If they have all the same number of frame, its possible to merge them into the same bmp and just make 1 sprite with a big number of frame. but is it possible to do the same thing if the animation don't have the same number of frame !

If you can, I can!
zeddex2
17
Years of Service
User Offline
Joined: 4th Mar 2007
Location:
Posted: 9th Nov 2008 17:58
Ok I put all my mouvement animation in 1 file to create only 1 sprite to make my mouvement.

The good point is I can use only 1 sprite for my mouvement and I don't have to move 3 other sprite with the one animated at that moment.

The bad side.

When 2 key are pressed.

My code is:


So if the key S and D are pressed, the sprite movement is stuck on the set sprite frame 1, X.

How I can check if 2 key are press on the keyboard at the same time ???

Thanks ppl

If you can, I can!

Login to post a reply

Server time is: 2024-05-03 23:47:03
Your offset time is: 2024-05-03 23:47:03