has anybody figured out how to do this with a moving goal? I'd like some help.
Offline
stickmanmessage wrote:
has anybody figured out how to do this with a moving goal? I'd like some help.
make a 10x10 square, and divide the stage into 10pixel squared graph paper, now, fill in a path by using the squares as a guidline, color the outer pixels of the squares four sides and use the different colors of each as hittests to find a route;
if color(left) not touching color(wall) change x by -10 if color(right) not touching color(wall) change x by 10 if color(up) not touching color(wall) change y by 10 etc
Yes, I've seen this method used before except, wait.
It's not working on a current project that I tested it on D:. but it would work with more than 15 mins of work.
Offline
cds56 wrote:
stickmanmessage wrote:
has anybody figured out how to do this with a moving goal? I'd like some help.
make a 10x10 square, and divide the stage into 10pixel squared graph paper, now, fill in a path by using the squares as a guidline, color the outer pixels of the squares four sides and use the different colors of each as hittests to find a route;
Code:
if color(left) not touching color(wall) change x by -10 if color(right) not touching color(wall) change x by 10 if color(up) not touching color(wall) change y by 10 etcYes, I've seen this method used before except, wait.
It's not working on a current project that I tested it on D:. but it would work with more than 15 mins of work.
Do you think I didn't already try that. The problem is in a maze, it'll get stuck.
Offline
Help me?
Offline
Can somebody help?
Offline
yes.
http://scratch.mit.edu/forums/viewtopic.php?id=35643
http://scratch.mit.edu/projects/coolstuff/1034493
But the project is not for Moving. its for STATIONARY Objects
Offline
Then it's useless. My problem is moving goals.
Last edited by juststickman (2010-06-18 15:31:10)
Offline
Help meh?
Offline
That has got a moving goal have you seen it?
Offline
johnnydean1 wrote:
That has got a moving goal have you seen it?
What?
Offline
Have you seen the project?
Offline
coolstuff wrote:
juststickman wrote:
Then it's useless. My problem is moving goals.
I might be able to modify it for moving goals
![]()
Maybe you will. But in the end, the main problem would be the speed... I'd have to duplicate all the checking blocks instead of repeats 10+ times....
Offline
juststickman wrote:
coolstuff wrote:
juststickman wrote:
Then it's useless. My problem is moving goals.
I might be able to modify it for moving goals
![]()
Maybe you will. But in the end, the main problem would be the speed... I'd have to duplicate all the checking blocks instead of repeats 10+ times....
Yeah, right now it duplicates a few times AND repeats a few times. The scripts are too hard to work with right now.
Offline
can you post it?
Offline
coolstuff wrote:
juststickman wrote:
coolstuff wrote:
I might be able to modify it for moving goals
![]()
Maybe you will. But in the end, the main problem would be the speed... I'd have to duplicate all the checking blocks instead of repeats 10+ times....
Yeah, right now it duplicates a few times AND repeats a few times. The scripts are too hard to work with right now.
Wow... Just wow... It must be long! When you post it I'll make the script without repeat blocks for you.
Last edited by MathWizz (2010-06-22 09:42:51)
Offline
coolstuff wrote:
juststickman wrote:
can you post it?
Well, my computer freezes every time I try doing anything with it... So probably not.
0_o
Can you post the concept? Don't be specific to the point of posting code but don't be so vague that all you're saying is...
find the move that makes you closest to the goal.
Offline
Anybody?
Offline
...
Offline
erm.... anybody?
Offline
So, how did it go?
Offline