SOLVED: Animate character whatever View Loop the character is in

Started by barefoot, Fri 18/03/2011 06:59:30

Previous topic - Next topic

barefoot

Hi

I have set up the below script that works in the global after clicking a button:

Code: ags

 }
   
 if (player.Room== 28) {
     cwizard.FaceLocation(264, 70);
     cwizard.Walk(260, 138, eBlock);
      cwizard.ChangeView(85);
     cwizard.Animate(3, 14, 0, eBlock);
   
     cwizard.ChangeView(3);
     cwizard.Say("My lightning bolt does'nt have any effect on him!!");

 } 
    }


As you can see, the character faces then walks to a location and then changes animation view to 85, does a simple animation and then reverts back to normal view (3) with a Say dialog.

What I am trying to achieve is to not have the character walk but to have the animation run whatever his frame view is.. that is: up, down,left,right. But using the animate character i am having to put a view loop in..  

Is the a good way around this?

I'm looking into while player is at x at the moment if that's any solution?

Ideally to be able to auto walk near to object and change animation view to face object and then fire at object...

Hope my question is understandable.

cheers

barefoot






I May Not Be Perfect but I Have A Big Heart ..

Creator

I'm positive that

Code: ags

cwizard.Animate(cwizard.Loop, 14, 0, eBlock);


will do what you're asking.

barefoot

Yes Creator.. brilliant, works.. many thanks..

just need to get char to face object..

UPDATE: Job now done.. :=

cheers

barefoot
I May Not Be Perfect but I Have A Big Heart ..

Creator

Quote from: barefoot on Fri 18/03/2011 07:34:11just need to get char to face object..

From this sentence, I can't tell if you know how to or not.
Just in case

Code: ags

cwizard.FaceLocation(oObject.X, oObject.Y);

barefoot

I actually used:

Code: ags

player.FaceObject(object[1]);


I will note what you put.

cheers again

barefoot

I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk