I made a dialog function where when you finnally persuaded a guy to give you an item he walk over to fetch it comes back and gives it to you.
Everything works besides that it doesn't show the giving animation for this character.
Here is the my script:
function dialog_request (int chabis) {
if (chabis==1) {
character[ABW].Walk(399, 240, eBlock);
Wait(160);
character[ABW].Walk(284, 265, eBlock);
character[EGO].LockView(28);
character[EGO].Animate(0, 0, 0);
character[EGO].UnlockView();
cEgo.FaceCharacter(cAbw);
}
}
It is view 28 and the first animation of it.. so 0.. no delay and play only once.. but he just seems to move over that and carry on without an error nor the wanted animation.
What did i do wrong?
Since the Character.Animation function is non-blocking by default, you have to make it block (wait), otherwise the script continues, immediately unlocking the view and facing the character:
character[EGO].Animate(0, 0, eOnce, eBlock);
or
cEgo.Animate(0, 0, eOnce, eBlock);
for short.
But in the manual it says the default is eBlock. And even after i wrote it in speficly like you suggested it still skips the whole thing.
------------------
EDIT:
Woops i think i found the mistake miself :D thank you very much :D i wouldn't have looked at it there if you wouldn't have replied so thank you very much
You're right, the default is eBlock. So what was the problem?
Uhh... kinda emberrassing... but i really somehow didn't see it for some reason for ages. I guess i was too concentrate on the problem. I simply chose the wrong charachter not the wrong animation. The Abw was supposed to get animated not ego. Wierd though that ego never changed to the sprite of abw.. but it all works now. so thank you very much yet again. 8)