Alice Community  

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

Reply
 
Thread Tools Display Modes
to senior members, help please
Old
rvmurphy
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jun 2011
Default to senior members, help please - 06-15-2011, 06:06 AM

can you look at this for me. I need to know is there a way to stop the bunny moving up/down once he has done it once.

Thanks
Attached Files
File Type: a2w draft3.a2w (937.1 KB, 16 views)
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 06-15-2011, 06:20 AM

Could you be a little more clear on what you are trying to do?

I believe that the answer to your question is to make a Boolean (true/false) variable, set its value to true, and, in your checkDistance method, do this:

If world.Variable
If (whatever the conditions are)
world.Variable set value to false
bunny.bunny up
Else
[do nothing]
If (whatever the conditions are)
world.Variable set value to false
bunny.down
Else
[do nothing]
Else
[do nothing]

Did you understand all that? Basically, make a true variable, add an If/Else around your entire checkDistance method, and make the variable become false once either the bunny goes up or the bunny goes down.

Does that help at all?


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
rvmurphy
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jun 2011
Default 06-21-2011, 04:25 AM

yes it did thanks for your help
   
Reply With Quote
Reply


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.