mrndkra
12-15-2008, 09:16 PM
Ok, well I am doing a project for my computer science class, and it involves a maze and 2 characters trying to get to the end to reach a cookie. I tried to make a function to make the letters "You Win" appear when one of the characters reaches the cookie, but it doesn't work. I need help with figuring out what's wrong with my code. If anyone wants, I'll attach the file if that will help you out. Please help ASAP
x2495iiii
12-16-2008, 03:16 PM
next time, describe the function. what code did you use, what's the user interface like, etc. It makes helping out that much easier
If it was me, I'd use
Loop infinity times:
If (character) is within (cookie's width/2) of cookie
(display your text)
Else
(do nothing)
Remember to be careful with Loop Infinity's though, they can make the world sluggish, especially if you use more than one.
If you HAVE to have a function, change (display text) to Return true and (do nothing) to Return false