Alice Community  

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

Reply
 
Thread Tools Display Modes
IF Statements
Old
pikemeister
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jun 2011
Location: Australia
Default IF Statements - 06-07-2011, 12:04 AM

Hi, working on a exercise to make a rabbit fall into a hole when a wolf is in front of the rabbit and within 4 mtrs. I can't seen to work it out. So far ive got

IF : husky distance in front of bunny > 4
do nothing
ELSE: rabbit moves down 0.5m

and nothing happens. Any ideas? Or am i on the right track ?
   
Reply With Quote
Old
ElectricKirby
Senior Member
 
ElectricKirby's Avatar
 
Status: Offline
Posts: 164
Join Date: May 2011
Location: Dreamland, Planet Popstar
Default 06-07-2011, 05:32 AM

"In front of" measures from the center forward. Won't work for objects behind.


My Favorite Resources:
Uploading Images - http://tinypic.com/

File Sharing - http://www.4shared.com/

Textures - http://www.filterforge.com/

Convertible Game-Ripped Models - http://models-resource.com/

Music - http://www.brawlcustommusic.com/gamelist
   
Reply With Quote
Old
pikemeister
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jun 2011
Location: Australia
Default 06-07-2011, 05:35 AM

yeah i understand that, but how can i code it so that when the wolf comes to within 4m in front of the rabbit, the rabbit goes down 0.5m...then after the wolf passes the rabbit and its 4m away, the rabbit comes back up 0.5m...then the wolf walks towards the rabbit from behind and eats it. I just need to figure out the code where the rabbit goes down 0.5m...once the wolf comes to within 4m of it... thanks!
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.