Order Problem [SOLVED]

Started by Krazy, Fri 21/01/2005 06:29:08

Previous topic - Next topic

Krazy

Gah, I tell the player to Walk over to an object, run dialouge then play a quick animation in that order but it keeps playing the animation then running the dialouge. What am I doing wrong  ???
My Stuffs:
Tumblr

strazer

The RunDialog command is delayed until the script finishes executing (see manual).
Add two "Run script..." actions for the same interaction, the first containing your Walk and RunDialog commands, the second one the rest.

Krazy

Ok that sorta works, but I used this code: SetCharacterView(0,3);AnimateCharacter(0, 2, 3, 1);  ReleaseCharacterView(0); and the animation won't play unless I get rid of the Release Character View in which case he won't stop playing the animation  ??? What's going on here?
My Stuffs:
Tumblr

Ashen

AnimateCharacter is non-blocking, so ReleaseCharacteView is called before the animatin has a chance to run. Without the ReleaseCharacterView, the animation will keep running because the last parameter of AnimateCharacter is 'repeat'.

Try using AnimateCharacterEx (which has a blocking parameter) or, as shown in the manual (but doesn't seem to work for me):
Code: ags

SetCharacterView(0,3);
AnimateCharacter(0,2,3,0);
while(character[0].animating) Wait(1);
ReleaseCharacterView(0);


If you actually want the animation to run more than once, I think you have to put the line in more than once, but I'm not sure about that.
I know what you're thinking ... Don't think that.

Krazy

Thanks! Works wonderfully  :)
My Stuffs:
Tumblr

SMF spam blocked by CleanTalk