This site requires JavaScript, please enable it in your browser!
Greenfoot back
LittleJacob
LittleJacob wrote ...

2014/2/20

Animatioon images

LittleJacob LittleJacob

2014/2/20

#
Hi i am new at greenfoot. I would like to make sprite with walking animations. Does anyone know how to do that.
Excelsior Excelsior

2014/2/20

#
Well, you need a .gif file, or a picture for every frame of animation. Then you need to set the actors picture to the one youve just created. You can do it simply by pressing RMB on the actor and "Set Image" then import it from a file, or just set a static image (in case youve chosen the image for every frame way) and update it to the image of the next frame every one or few steps.
lordhershey lordhershey

2014/2/20

#
Yes, it takes a bit of coding as well as the images themselves. There are many scenarios on the site where it will have an "Open in Greenfoot" button on the page. click that and you will download a compressed file that greenfoot can extract the project from and look at the code in there. That is where I would start.
LittleJacob LittleJacob

2014/2/20

#
i have different sprites but i dont know to program it in order to change the sprite as my player walks
Excelsior Excelsior

2014/2/20

#
You can write a code that checks if player should be walking, then changing its image to the next one every few steps.
LittleJacob LittleJacob

2014/2/20

#
if i press left my player moves if i change the sprite at the moment that i press left it would only change one step. I want to know how the player can have a walking effect even if i hold down left to move
Excelsior Excelsior

2014/2/20

#
Is it possible to get the code for that class? I should be able to answer right away.
You need to login to post a reply.