Alice Community  

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

Reply
 
Thread Tools Display Modes
How do i make things sense proximity
Old
robertandmike
Guest
 
Status:
Posts: n/a
Default How do i make things sense proximity - 12-18-2008, 10:30 AM

I am doing an interactive alice program for school where things are raining down from buildings to beach balls (set to invisible) the goal is to make it to the other side of a passage with the buildings creating barriers on the left and right sides without getting hit. It is a first person game, so i set the arrow keys to control the camera. How do i get the world to sense that the camera has been hit by one of the falling objects?
   
Reply With Quote
Old
("Robby")
Guest
 
Status:
Posts: n/a
Default 12-18-2008, 10:33 AM

Click on camra.
Then go to the properties of camra.
Then set the solid thing to 100%.

If you cant then "I Dont Know"
   
Reply With Quote
Old
robertandmike
Guest
 
Status:
Posts: n/a
Default 12-18-2008, 10:50 AM

I don't see that setting,
but thanks anyways
   
Reply With Quote
Old
robertandmike
Guest
 
Status:
Posts: n/a
Default 12-18-2008, 11:26 AM

I figured it out

incase any one else wants to know

you need to make an if statement saying that
If the object is within x meters of the camera then
do your a lose method

the thing is you need to constantly check whether this is happening
you do this by enclosing the if statement in an infinity loop (courtesy daniel childers)
then incase that in a do together with the rest of the methods that make your world work

just make sure that if these other methods must be done in order to put them into a do in order within the do together

this in pseudocode

do together
do loop infinity times
if statements (to check for proximity)
do in order
the rest of your methods
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-18-2008, 12:47 PM

That's right, but remember to be careful with "do infinity times" methods, they can make your other methods run slowly or stop them from running entirely (if used improperly).


(')>
   
Reply With Quote
Old
robertandmike
Guest
 
Status:
Posts: n/a
Default 12-18-2008, 08:14 PM

cool
good to know
thanks
   
Reply With Quote
Old
RockyTheConcreteDonkey
Guest
 
Status:
Posts: n/a
Question 12-18-2008, 10:21 PM

I believe I posted a tip like this in my old account...

http://www.alice.org/community/showthread.php?t=1548
   
Reply With Quote
Reply

Tags
funny, proximity, sense, student, target

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