Problem with walk animation

Started by mornin (away for quite a while), Tue 07/09/2004 21:29:32

Previous topic - Next topic
Hi,

this may sound very stupid  :-[, but I've already tried everything and just can't get it work properly:

I've made a walk-cycle for the main character of my new project and to make it look fluently I had to delete two frames, namely the normal standing frame and the one that follows. Maybe some visual elements help to show what I mean. This is the complete animation with the standing frame:

It looks crap because the standing frame doesn't fit in. So I removed it and got this:


This one looks far better, but now the standing frame is missing and he seems to stand on one leg as soon as he stops walking. I don't want to redo all the frames to get an animation where the standing view fits into, because this one was really a lot of work. So I thought that there might be a way to script it. I read a tutorial about how to make idle animations by slypher and tried to use this script for my problem. It worked partly, because the character stands properly, but I can't get the walking animation working again if he starts walking. I'm new to AGS and therefore I don't know much about scripting, but anyway, here is what I did:

function repeatedly_execute() {

if((character[EGO].walking==0)&&(character[EGO].animating==0)){
     if(character[EGO].loop==1){ //Left
         SetCharacterView(EGO, 4);
         AnimateCharacter(EGO, 1, 0, 0);
}

else if(character[EGO].loop==2){ //Right
     SetCharacterView(EGO, 5);
     AnimateCharacter(EGO, 2, 0, 0);
}
}

if((character[EGO].walking==1)){
     if(character[EGO].loop==1){
         SetCharacterView(EGO, 2);
         AnimateCharacter(EGO, 1, 1, 1);
}

else if(character[EGO].loop==2){
     SetCharacterView(EGO, 2);
     AnimateCharacter(EGO, 2, 1, 1);
}
}
}

Well, I don't know what's wrong with it.  First I set the character view to the standing frame when the character is not walking. This worked. Then I tried to set the view back to the animation view, but this didn't work...

My question now is: Is this possible like this and I just messed up some details or is this the completlely wrong way? If it is the wrong way, is there anything else I could do to script this?  ???

Thanks in advance
mornin

Proskrito

in walking views loops, the first frame must be the standing one, and it wont show in the real walking animation, so just set the first frame as the standing one, followed by all the others : )

Goot

Why do you need all that scripting to make someone walk?

Cpt_Jigglypuff

Quote from: Proskrito on Tue 07/09/2004 22:12:43
in walking views loops, the first frame must be the standing one, and it wont show in the real walking animation, so just set the first frame as the standing one, followed by all the others : )

He's right, just make sure in the view that the first frame is the standing frame then bada-bing it should work....

And btw, the dude's belly-button blinks during one of the frames  :-[

I did use the standing view as the first frame in AGS, but it still looks crap. That's why I tried to script the whole thing. I don't know why, but it doesn't work for me. I'll re-install the programm again. Maybe it works then...

But thanks anyway. I'll work on the belly-button

TerranRich

When you say "it still looks crap," do you mean in-game, while it's running and you're playing it? Or do you mean when you preview the animation? I'm not sure about the animation, but as long as the first frame is the standing frame and the rest are the walking frames, it should look just like your second (good) animation.
Status: Trying to come up with some ideas...

Quote from: QuantumRich on Fri 10/09/2004 23:59:00
When you say "it still looks crap," do you mean in-game, while it's running and you're playing it? Or do you mean when you preview the animation? I'm not sure about the animation, but as long as the first frame is the standing frame and the rest are the walking frames, it should look just like your second (good) animation.

I meant it still looks crap in-game while I'm playing it. I don't know what's wrong with my computer, but I tried to make it on a friend's computer and there it worked. I'm really a bit puzzled now  ???.
Anyway, I think it's just a problem that I have on my computer, so, I'll just use this wonderful comand format C and reinstall everything. Hopefully it works then...

Thanks to everybody for helping me.
mornin

Scorpiorus

So, you say that you recreated it on a friend's computer, not ran your game, right?

If you haven't yet formated your HD, I can suggest making a little test game, set up a normal view and see if it still doesn't work.

I did already try and make a test game. Still didn't work properly on my computer. My registry was full of rubbish and all kinds of programs were crashing or had nasty bugs. I reinstalled everything and it works now. I have absolutely no idea what could have caused the problem. I already wondered why it was so hard to make someone walk on AGS. Now I see that it isn't  ;D, at least not with "normal" computers.
Anyway, it works perfectly now. No need to script anything anymore. Thanks again to everyone who tried to help me. Without you I wouldn't have recognized that the problem was my comp and not AGS.  :=

cu
mornin

EDIT: Oh and I wouldn't have recognized the blinking belly button either  ;)

SMF spam blocked by CleanTalk