Alice Community  

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

Reply
 
Thread Tools Display Modes
help with game
Old
kris33
Guest
 
Status:
Posts: n/a
Default help with game - 11-02-2006, 12:06 PM

hi,
I'm new to this forum, and I need a little help...

In my class were were assigned a project to make a game. In mine, I have my main character (who happens to be a penguin), who is trying to defeat other characters (snowmen). First of all, I would like all the controls to be by keyboard. I want the user to be able to type <enter> and do the method for hit (which i already created)...however, I want it so that whichever snowmen he hits, disappears. As of now, when the user hits <enter>, it has to be a specific snowmen. Is there a way to make it be any of the snowmen...
you know, you approach the first guy, and type <enter>, the penguin hits him, and he disappears. Is this possible, or can I only do it by having the snowmen be clicked on.

I hope this makes sense, and I appreciate any responses!

~kris
   
Reply With Quote
Old
roofy
Guest
 
Status:
Posts: n/a
Default 11-02-2006, 02:46 PM

If I understand you correctly, you want to know if you can create a condition that only checks for the snowmen only.

In this case, the answer is yes, but I have a question for you. Do you have the Learning to Program with Alice book? If so, you can look back at the zues project in both chapter 5 and chapter 6.

Note... after learning the method in chapter 5, the problem you will get is that any object can be clicked on. However, in chapter 6, the book shows you how to resolve that problem from chapter 5. Therefore, I would recommend reading those 2 zues projects from the book, and you will get your answer on how to do what you want your game to do.
   
Reply With Quote
Old
Shadow Sovereign
Guest
 
Status:
Posts: n/a
Default 11-03-2006, 08:29 PM

I have that project in the classroom, but I'm at home right now. On monday morning, I'll post my Zeus world so you can get an idea of what you need, bud (Assuming you don't have the book!)...
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 11-03-2006, 08:42 PM

Yes. Please post your code and your world file.
   
Reply With Quote
Old
Shadow Sovereign
Guest
 
Status:
Posts: n/a
Default 11-03-2006, 08:47 PM

Will do. In the meantime, I'll try and see if I can get some of these other things done while I'm burnin' off my newly-opened time this weekend... my computer school canceled the LAN party I was going to go to tomorrow.
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 11-03-2006, 09:17 PM

We like to help others with their homework on this site.

So, as you offered, PLEASE post not only the .A2w but also the code. And if you could, would you mind including comments in your code? It would help others.

Last edited by lanceA; 11-03-2006 at 09:19 PM.
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 11-04-2006, 01:31 AM

Please do not post complete solutions to problems. We would rather have you explain the process of solving a problem and focus on programming concepts or Alice UI things.
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.