I'm trying to have it when a click on a door it changes view to one that anims ego reaching for the door knob but he is facing the wrong way when he anims ?
FaceLocation(EGO,16,121);
AnimateCharacter(EGO,3,0,0);
That must not be right ?
Edit ::
if I do a Quick Character animation it works .
But he is real big so how do I set the size so he is the same before he clicked the hotspot ?
Or is there a better way ?
FaceLocation(EGO,16,121);
AnimateCharacter(EGO,character[EGO].loop,0,0);
That's because you fixed the character's animation to use loop 3, which may not be the correct loop after FaceLocation().
With this one he does a quick shuffle and then stops not the one I want to run ?
FaceLocation(EGO,16,121);
AnimateCharacter(EGO,character[EGO].loop,3,0);
The one I want to run is View3 with 6 frames . number 0 on the frame .
You should check the function parameters carefully, in Animatecharacter(), that parameter is for loop, not view, you need to use SetCharacterView() before the animation, and ReleaseCharacterView() afterwards to restore it. So:
FaceLocation(EGO,16,121);
SetCharacterView(EGO,3);
AnimateCharacter(EGO,character[EGO].loop,0,0);
while(character[EGO].animating) Wait(1);
ReleaseCharacterView(EGO);
(If you don't want that while line, use AnimateCharacterEx() instead to make the animation blocking.)
Thank works really good . anyway I can set the anim sprite so it is the same size as the ego sprite . it is a little bigger so looks funny when it runs .