Thread: Game Help?
View Single Post
A suggested methodology
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default A suggested methodology - 10-14-2007, 07:23 PM

Quote:
Originally Posted by cutshortmisery View Post
I'm using Alice. I just want each arm to be able to karate chop or something and to be able to get a weapon attached/de-attached to the palm. I figured out I could make the arms turn to do the attack but I'm not sure how to make the enemy's weapon stay but the rest of the enemy vanish. I'm using the troll with the club and i want to be able to kill the troll in the game, get the club, and drop it later on.
Creating a complex animation is a difficult and tedious task. Only you will be able to do it the way you want it to be done. In the meantime, let's simplify things a bit. Let's assume that your hero has only one arm with an elbow and a wrist that move but that the fingers don't move. This would give us an upper arm, a lower arm, and a hand. Adding fingers that can be wrapped around the club would add quite a bit more complexity.

Assume that your hero sees a club on the ground, bends over, picks it up, and then straightens back up and moves along.

(Just as a preview, you will probably cause the hand to become the vehicle for the club at the appropriate time in order to pick it up and carry it off.)

The best that I can do is to describe a methodology for you to use in order to identify and test all of the required steps in the animation, one step at a time.

Go to http://www.dickbaldwin.com/alice/Alice0120.htm and learn how to make interactive method calls on an object (the arm). Then experiment by making interactive method calls on the upper arm, the lower arm, and the hand to cause your hero to bend over and touch the club. (See http://www.dickbaldwin.com/alice/Alice0900.htm for a description and illustration of the behavior of each of the primitive methods.)

When you interactively call a method that doesn't contribute to the desired result, click the undo button to reverse the process. When you interactively call a method that does contribute to the desired result, write it down. (You will later use your list of successful method calls to create your animation program.)

You can't set the vehicle property interactively, so just pretend that you do when the hand touches the club. Then experiment by making interactive method calls to cause your hero to stand back up and move along with the club sticking to his hand. (Once again, write the successful method calls on your list.)

Once you have identified all of the method calls required to produce the animation and have entered them in your handwritten list, code them into your program in the same order that you have them on your list.

At that point, you will need to deal with things like the duration of each method call to control the time expended for each operation and the style to control how each movement starts and ends.

At the appropriate point in the sequence, after the hand touches the club, put a statement in the program to set the vehicle property for the club to be the hand.

I hope that you find this helpful. What would probably be more helpful would be for you to go to http://www.dickbaldwin.com/tocalice.htm and begin carefully studying Lesson 100. Work your way through each lesson until you reach Lesson 190. Pay particular attention to Appendix A along the way.

Dick Baldwin
http://www.dickbaldwin.com/tocalice.htm
http://www.dickbaldwin.com/toc.htm
   
Reply With Quote