Now we need to set up a FINISH target for the maze.
So, please import this image into your stack:
-
-
Set its location, and rename it 'target'.
-
-
Remember to save your work.
Babies love mazes.
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Babies love mazes.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Babies love mazes.
Now we must input code to STOP our man going THROUGH the walls of our MAZE.
Remember we made all the bricks in our MAZE into a [b]GROUP[/b] called 'walls'.
Now we can use the INTERSECT term to check if our man is crossing walls:
- -
You will see 'exit to top': this is to STOP any further code executing.
Now we can use INTERSECT again to check when our man hits the finish target.
But, to make things a bit more exciting please import the following image into your stack:
- -
Change its name to 'win', and make it INVISIBLE:
- -
Remember to save your work.
Remember we made all the bricks in our MAZE into a [b]GROUP[/b] called 'walls'.
Now we can use the INTERSECT term to check if our man is crossing walls:
- -
You will see 'exit to top': this is to STOP any further code executing.
Now we can use INTERSECT again to check when our man hits the finish target.
But, to make things a bit more exciting please import the following image into your stack:
- -
Change its name to 'win', and make it INVISIBLE:
- -
Remember to save your work.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Babies love mazes.
Now we can input code to check if our man has hit the target:
- -
Now we need to put a bit more code in the RESET button so users can restart the game:
- -
Remember to save your work.
- -
Now we need to put a bit more code in the RESET button so users can restart the game:
- -
Remember to save your work.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Babies love mazes.
Here is the completed exercise:
- Attachments
-
- MAZE.oxtstack.zip
- (371.65 KiB) Downloaded 120 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
- richmond62
- Posts: 4243
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Babies love mazes.
Luckily for me my 7 year old 'victim' gave me some useful feedback:
"When the man turns he doesn't turn, so I don't know where he's going."
So, here is an improved version that 'turns' the man:
- - -
"When the man turns he doesn't turn, so I don't know where he's going."
So, here is an improved version that 'turns' the man:
- - -
- Attachments
-
- MAZE.oxtstack.zip
- (392.63 KiB) Downloaded 115 times
https://richmondmathewson.owlstown.net/
Who is online
Users browsing this forum: No registered users and 0 guests