Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Game Help?
Old
cutshortmisery
Guest
 
Status:
Posts: n/a
Default Game Help? - 10-14-2007, 04:28 PM

I'm trying to make a 1st person game using the camera and left and right arms as my character. I've figured out how to make the camera the arms' vehicle. I want to be able to attack, pick up objects, and drop objects. How can I do this? Any help would be greatly appreciated.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 05:19 PM

Quote:
Originally Posted by cutshortmisery View Post
I'm trying to make a 1st person game using the camera and left and right arms as my character. I've figured out how to make the camera the arms' vehicle. I want to be able to attack, pick up objects, and drop objects. How can I do this? Any help would be greatly appreciated.
I am assuming that you want to learn how to write computer programs. A computer program is composed of a set of well-defined tasks that may be executed in a wide variety of ways. So far at least, computers only do what they are told to do.

Perhaps you should slow down a bit and design your program. Exactly what is the very first thing that you want one of your animated arms to do, and which arm do you want to do it?

Maybe if you can answer that question, someone can help you learn how to design and implement that task.

In the meantime, you may want to take a look at the lessons at http://www.dickbaldwin.com/alice/Alice0120.htm and http://www.dickbaldwin.com/alice/Alice0125.htm where you will find information on how to cause an ice skater to bend her leg at the knee and point her toe. Similarly, the lesson at http://www.dickbaldwin.com/alice/Alice0110.htm explains how to manipulate a coach object's left arm.

Dick Baldwin
http://www.dickbaldwin.com/tocalice.htm
http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
cutshortmisery
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 05:28 PM

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.

Last edited by cutshortmisery; 10-14-2007 at 05:32 PM.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 05:44 PM

What are you using for arms? More specifically, do the arms that you are using have hands with fingers that have the ability to grasp something?
   
Reply With Quote
Old
cutshortmisery
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 05:52 PM

They're the left arm and right arm that are on the alice web gallery. They have palms and fingers.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 05:58 PM

Which section of the web gallery are they in? There are about 1,000 objects in the web gallery.
   
Reply With Quote
Old
cutshortmisery
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 06:00 PM

They are in "People".
   
Reply With Quote
A suggested methodology
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default A suggested methodology - 10-14-2007, 06: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
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 06:39 PM

Quote:
Originally Posted by cutshortmisery View Post
They are in "People".
OK, so you don't have an upper arm. However, you do have a lower arm, a hand, and lots of finger parts. That makes life quite a bit more difficult.

However, the general approach that I described using interactive method calls will still work. If it were me, I would initially ignore the thumb and all of the fingers other than the index finger and just figure out how to wrap the index finger around the club to pick it up. Once you have that figured out, the steps required to wrap the other three fingers around the club should be similar, but the thumb will be a little different.

Good luck. Please post your world once you have it working for all to enjoy.

Dick Baldwin
http://www.dickbaldwin.com/tocalice.htm
http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
TheRaiderNation
Guest
 
Status:
Posts: n/a
Default 10-14-2007, 11:30 PM

okay well its pretty simple once you get it, if you want the person to karate chop something for example just do this:
-create a new even "when X is clicked" (X of course standing for whatever you want that letter to be) world.karatechop
-create a new method in world called karatechop or something like that
-then place some kind of code like:
--------
right.arm turn forward 0.25 revolutions
right.arm turn backward 0.25 revolutions
--------

As for picking something up, you need to create a check, if you will-
something along the lines of this
Variables- Itempickedup(true)

While "Itempickedup"------
If |Camera| is within |however close you want the camera to be inorder to pickup the item|
-----------------------------------------------------
-Whatever code is necessesary to pick up your item here
-Set |Itempickedup| to false
-----------------------------------------------------
else-
Do nothing
--------------------------------------

Sorry if that's a little complicated.

Last edited by TheRaiderNation; 10-14-2007 at 11:32 PM.
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.