Thread: Chance?
View Single Post
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 06-11-2010, 11:00 PM

Inside the if statement you have to have a "a < b" statement (found in world.functions). Then for "a" you put distance between knight and boar (found in knight.functions) and for "b" you put the distance in meters (in this case 15). That should work as long as you put it in the correct place in the code (think out the steps in your head from when you press the button and what will happen in each code of the method, and place it in the correct order for it work properly for what you want it to do).


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote