SOLVED: Changed character to new view and does not animate as he moves..

Started by barefoot, Wed 23/02/2011 23:23:07

Previous topic - Next topic

barefoot


Hi

I've changed my character view so he is in a canoe..I have made the animating view and included this in the script below, yet he simply glides across without animating (rowing). The animating view itself is perfect.

The new view only lasts about 3 seconds and then he returns to his normal view.

Code: ags

function region1_WalksOnto()
{
  
  RestoreWalkableArea(2);
  cwizard.Say("I need to get across the river, that man may be a sage!");
  Display("You get in your canoe and oar your way across the Great River");
  cwizard.ChangeView(24);
  cwizard.Walk(518, 186, eBlock);

}


I don't normally have this problem...

cheers

barefoot

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

Baron

Does View 24 have animated frames in all of its loops, especially the loop related to the direction of travel in question (loop 1 = left, for example)?

barefoot

Hi Baron

All 4 loop views are correct ie they work in views view as it were and are view no. 24..

I'm using a workaround until it's sorted.

cheers

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

Icey

If it's a clear path for the wizard you can try this.
Code: ags

cwizard.changeview(24);
cwizard.animate(direction, delay, enoblock, erepeat);
cwizard.Walk(518, 186, eBlock);

barefoot

Hi Studio3

after adjusting your code (caps etc) I put this in:

Code: ags

function region3_WalksOnto()
{
  cwizard.Say("I need to get across the river, that man may be a sage!");
  Display("You get in your canoe and oar your way across the Great River");
  cwizard.ChangeView(24);
  cwizard.Animate(2, 1, eNoBlock, eRepeat);
  cwizard.Walk(518, 186, eBlock);
 
}


The character animates but does not walk,,,, it is on a walkable area.

cheers

barefoot


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

Icey


Icey

i mean add this.
Code: ags
cwizard.Walk(0, 0, eBlock, eAnywhere);


Just replace the old walk command I gave you with this

barefoot

Hi

Nothing seems to get this character to change view and animate whilst walking..could something possibly be blocking it?

here is a screen shot of the views (24)



Ive had a lot of problems with AGS lately..

barefoot

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

Gilbert

Well, simple. There is no animation in this character view.

Make sure you remember the fact that the first frame of the walking view of a character is the stationary frame, so the animation in each direction actually starts from the second frame. Just add one more frame (just use the same sprite you use as the stationary frame) to the end of each loop to complete the animation.

Note that if you use character.Animate() it can indeed include the first frame in the loop in the animation. However, as your code is followed by character.Walk() the "...Animate()" line actually does nothing here (and thus can be removed).

barefoot

Dear Iceboty V7000a

Something I had overlooked..  many many thanks...

cheers

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

SMF spam blocked by CleanTalk