Asanine And Appaled Antics At Articulating An Animation Attempt

Started by rtf, Fri 13/02/2004 23:40:46

Previous topic - Next topic

rtf

Something isnt working right in this animation command.
Everything works except for the actual animation.  All the loops and views are correct, and I can't see a problem:

Quote
StartCutscene(1);
MoveCharacterBlocking(1, 661, 106, 0);
DisplaySpeech(1, "Take a deep breath and...");
SetCharacterView(1, 14);
AnimateCharacter(1, 2, 3, 2);
SetCharacterView(2, 15);
ObjectOn(5);
DisplaySpeech(1, "Hahahahahahaha!");
ReleaseCharacterView(1);
EndCutscene();

If you help me out I might add your name to my credits  :D
I fail at art.

Squinky

You probably need to put a Wait (); command in there after the animation.

Darth Mandarb

use this:

StartCutscene(1);
MoveCharacterBlocking(1, 661, 106, 0);
DisplaySpeech(1, "Take a deep breath and...");
SetCharacterView(1, 14);
AnimateCharacter(1, 2, 3, 2);
while (character[CHARID].animating==1) {
 Wait(1);
 }

SetCharacterView(2, 15);
ObjectOn(5);
DisplaySpeech(1, "Hahahahahahaha!");
ReleaseCharacterView(1);
EndCutscene();

See if that works.

~ d

Edit - Squinky's idea would work too ... but you'd have to play around with how long to wait to get it to work right.  This way just waits until the animation stops and then continues the script.

rtf

I fail at art.

rtf

Uh oh, I tried Darth Mandarb's thing and it didnt work.  And I added a wait command but still nothing happened.
I fail at art.

Darth Mandarb

Quote from: releasethefrogs on Sat 14/02/2004 16:59:20
Uh oh, I tried Darth Mandarb's thing and it didnt work.  And I added a wait command but still nothing happened.

D'OH!!  I can't believe I didn't see this first:

StartCutscene(1);
MoveCharacterBlocking(1, 661, 106, 0);
DisplaySpeech(1, "Take a deep breath and...");
SetCharacterView(1, 14);
AnimateCharacter(1, 2, 3,0); // last digit can only be 0 or 1 (0 no repeat, 1 repeat)
while (character[CHARID].animating==1) {
Wait(1);
}
SetCharacterView(2, 15);
ObjectOn(5);
DisplaySpeech(1, "Hahahahahahaha!");
ReleaseCharacterView(1);
EndCutscene();

You can't use the "while" statement if you set it to repeat though, cause it'll keep waiting forever!  So you'll have to make the animation double up if you wanted it to run through twice!

See if that works!

~ d

SMF spam blocked by CleanTalk