R2D2 like animation

Started by Etcher Squared Games, Tue 19/04/2005 23:13:04

Previous topic - Next topic

Etcher Squared Games

So, a friend of mine I introduced AGS to was curious about this....

"How would I do a special walk animation for an R2D2 character, where anytime you move it first runs a single loop (of r2's 3rd leg popping out) while standing still, THEN moving to where you clicked?"

break down:
Click walk at some part of room
character (r2d2) stays STILL and runs 1 loop of a animation....
Once that loop is done once, then do normal walking animation.

Checking the boards I didn't see too much to do what he wants, but I may have been searching with bad keywords.

I kinda had a solution for him, but wanted to make sure there wasn't something easier....


My initial idea was to have a custom walk icon (as to not to use the default actions of the normal walk icon)...

Then he would need code in repeat exe to determine say, that the custom walk was clicked
then if you aren't already moving, run the special loop
then execute repeatedly the normal walking view
once you hit the desired spot, kill the walking loop...

Is there a simpler way to accomplish this?


website: http://www.etcher2games.com/
email: etcher2games@yahoo.com
forum: http://www.etcher2games.com/forums

Anyone want to make my website for free?

stuh505

Dont have AGS before me...but if I recall correcctly, under mouse detection there is some code that checks to see if you are in walk mode, and if you are tells it to walk to that position.  If that is the case, then you can simple tell it to execute the first walking animation (with blocking) before invoking the regular walk to thing.

If my memory is wrong and this code is all handled behind the scenes, then you could try using a different custom mode for walking, in which you first run the loop you want (with blocking) and then execute a click in walk mode to the position they clicked.

There is definitely no reason to need to run the walking animation manually.  I can give you a better answer when I get home if you still havent figured it out.

stuh505

Code: ags


Ã,  else if (button == eMouseLeft) 
Ã,  Ã,  {
Ã,  Ã,  if (GetCursorMode() == eModeWalkto)
Ã,  Ã,  Ã,  Ã,  //animate character

Ã,  Ã,  ProcessClick(mouse.x,mouse.y, mouse.Mode);
Ã,  Ã,  }



Use AnimateCharacter function to animate the loop, make sure to set Blocking.

SMF spam blocked by CleanTalk