Alice Community  

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

Reply
 
Thread Tools Display Modes
Scuba Game
Old
Franki3B
Junior Member
 
Status: Offline
Posts: 2
Join Date: Dec 2011
Default Scuba Game - 12-12-2011, 10:34 AM

I am working on the scuba game from the book where a diver gets near a fish and uses a key press(P) to pick up a fish and drop it off at a target with (D). I think I have the rest of it, but I cannot figure this part out. Any advice or suggestions, and I would upload the file but it is huge.
   
Reply With Quote
Old
dakota95
Senior Member
 
dakota95's Avatar
 
Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
Default 12-12-2011, 12:57 PM

Quote:
Originally Posted by Franki3B View Post
I am working on the scuba game from the book where a diver gets near a fish and uses a key press(P) to pick up a fish and drop it off at a target with (D). I think I have the rest of it, but I cannot figure this part out. Any advice or suggestions, and I would upload the file but it is huge.

look at my dragon vs knight thread in the share worlds section. In the demo there is a key that you have to pick up and open a door with.

the way you do it is by saying if 'p' is pressed do 'method pick up'

first you will need to make the method. Just click on world and create new method.

in the method say if diver is within '5' meters of fish, then fish move to divers hand. And fish set vehicle to diver. That way the diver can only pick up the fish if he is 5 meters away from it.

then create a new method called 'drop off fish' and then say when 'd' is clicked do 'drop off fish'. o
in the method 'drop fish off' say if fish is within '5' meters of 'drop off point' then fish move to 'drop off point' and set vehicle to 'drop off point'


<Insert_Signature_Here>
   
Reply With Quote
Old
Franki3B
Junior Member
 
Status: Offline
Posts: 2
Join Date: Dec 2011
Default 12-12-2011, 05:16 PM

Thanks. I will try that as soon as I get home. I have already turned in all my work for this but I am really irritated that I couldn't make it work.
   
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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.