Alice Community  

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

Reply
 
Thread Tools Display Modes
trying to make a game
Old
aprils1293
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jul 2018
Unhappy trying to make a game - 07-11-2018, 09:26 PM

Hello guys,
Im trying to make a game called puttbull (similar to golf ) so wherever the ground is clicked on the baseball will go in that direction to go to the closest hole and then you score a certain amount of points.I have the timer made but I'm lost on how to make it actually work.Please help me if you can! thanks
Attached Files
File Type: a2w PuttBall.a2w (594.2 KB, 1 views)
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 249
Join Date: Dec 2012
Location: Frosno, Ca
Default 07-12-2018, 05:58 PM

Quote:
Originally Posted by aprils1293 View Post
Hello guys,
Im trying to make a game called puttbull (similar to golf ) so wherever the ground is clicked on the baseball will go in that direction to go to the closest hole and then you score a certain amount of points.I have the timer made but I'm lost on how to make it actually work.Please help me if you can! thanks
You need to do a few things for this:
  1. Let the user determine which direction to hit the ball.
  2. Move in the desired direction some random amount. This assumes the user doesn't always get a whole in one.
  3. Test if the ball ended up in the hole.
I added a method to do this for the 3rd hole and an event that calls it if the 'S' key is pressed. You would need to do something similar for the other holes.

Mark
Attached Files
File Type: a2w putt_V2.a2w (577.1 KB, 1 views)


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Reply

Tags
game

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