Alice Community  

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

Reply
 
Thread Tools Display Modes
Help resetting torus position in ring toss, catch game.
Old
todd0312
Member
 
todd0312's Avatar
 
Status: Offline
Posts: 35
Join Date: Sep 2011
Exclamation Help resetting torus position in ring toss, catch game. - 11-05-2011, 01:54 PM

I have the following project:

Create a ring catching game using a torus and cone created from the Shapes gallery. The ring should fall from the sky while the user moves the cone along the ground with the mouse. The user’s objective is to catch the ring with the cone. Following each attempt, reset the ring’s position. Stop when the user has caught 10 rings.

Just to test it, I have my cone set up directly below the torus. When it falls from the sky and lands w/i a certain distance of another cone (placed inside the first), both torus and cone change color, and the counter at the top (Rings Caught) sets to one.

Theoretically, rings should keep falling from the sky from different positions, but I can't figure out how to "reset the ring's position."

The problem I have is resetting the rings positions so that if falls from a different position each time. It is fairly difficult to catch the rings, and I don't want to have 50 rings hanging in the sky ready to drop from different positions.

Can I set it up so the one torus rises after landing switches position (right, left, fwd, bwd) randomly? I am completely lost on how to set this up. I have attached my lame little program - any help - Greatly, Greatly appreciated.

Confucius says: take pity on the noob.

Thanks.
Attached Files
File Type: a2w Lab3.a2w (162.8 KB, 48 views)
   
Reply With Quote
Old
Powerhouse64
Senior Member
 
Powerhouse64's Avatar
 
Status: Offline
Posts: 54
Join Date: Nov 2011
Location: In ur base, movin ur stuffs
Default 11-05-2011, 02:53 PM

What you can do is:

Set up an object in the sky at whatever you want the height of the ring to be at (make it invisible if the torus's starting position is within view of the player)

Then, after the ring hits the ground/is caught by the cone, have the ring go to that object in the sky, and move horizontally forward at [X] speed for [X] seconds, then left at [X] speed for [X] seconds, then backward in the same way and right in the same way, and make all [X]s random numbers between whatever values work for the size of your playing area

This should make the drop area of the torus pretty random, but if it's not quite enough, I can detail how to make it even more random!!!

Essentially, this should provide you with a random enough spread, with a reliable system of using the same torus an infinite number of times without having to have a gazillion torus's floating in midair. If you have any questions, do not hesitate to ask!


Hogwarts: Where everything is made up, and the points don't matter
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.