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

2017/2/3

Im trying to create a fighting game

yotemo1 yotemo1

2017/2/3

#
I,m having problems creating a fighting game. I,m trying to get the person to move and punch and strike but don't know how. Can anyone help me with the coding??????
lordhershey lordhershey

2017/2/4

#
Making an actor do several independent actions at once is not a trivial task. Usually it would either require lots of images, or multi part sprite, or on the fly rendering. How many fighting moves do you wish to make?
yotemo1 yotemo1

2017/2/7

#
I'm more trying to get it to show the action of them moving which i can't do if i get that down everything will be fine
lordhershey lordhershey

2017/2/7

#
I am pretty sure someone would have a sample that could be used. I am kind of surprised that someone has not made a sample and posted a response.
Super_Hippo Super_Hippo

2017/2/7

#
You probably need a bunch of images for each action and then set the next image after a certain amount of time depending on the current action.
AuroraGamer AuroraGamer

2017/2/8

#
You could just create a gif animation and import the GifImage class, that's what I always do. Then you would just have to have it at the top with the rest of the variables
GifImage runRight = new GifImage("filename.gif");
then I usually just write somewhere else in the code (usually in a movement method),
if (Greenfoot.isKeyDown("right"))
{
move(8);
setImage(runRight.getCurrentImage());
}
yotemo1 yotemo1

2017/2/8

#
ok thank you
yotemo1 yotemo1

2017/2/9

#
Question umm how do you create an GifImage class because its not working tbh
Super_Hippo Super_Hippo

2017/2/9

#
Press Ctrl+I and import it.
lordhershey lordhershey

2017/2/17

#
Started messing with the concept here Fighter Man Demo it only does movement, there is nothing to fight just yet.
You need to login to post a reply.