Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Limiting player movements
- MisterCrabby
-
Scratcher
4 posts
Limiting player movements
Hello I'm trying to make a puzzle game where the player has to fill all the dots in one line. So far I have made plenty of progress but I can't seem to limit the player to go in a line.Here is my game it is not finished click the flag to start it.
Last edited by MisterCrabby (Feb. 5, 2022 18:53:05)
- Spentine
-
Scratcher
1000+ posts
Limiting player movements
I'm not sure how you're supposed to fill in all the dots in one line, it can only fill 5 can't it?
Also the instructions weren't very helpful on how to play the game
found no red circles
Also the instructions weren't very helpful on how to play the game
found no red circlesLast edited by Spentine (Feb. 5, 2022 20:35:42)
- MisterCrabby
-
Scratcher
4 posts
Limiting player movements
Sorry I have done that mechanic the game will pick a random position for the green and red circle. Also I need to only let player click dots next to the dot they just clicked not just anywhere in the grid.
Last edited by MisterCrabby (Feb. 5, 2022 20:59:06)
- Thingied
-
Scratcher
1000+ posts
Limiting player movements
Variables needed:
current dot - for all sprites
Lists needed:
surrounding dots - for all sprites
Scripts:
1.

2.

3.

Explanation:
Every time the player draws on a new dot, it changes the “current dot” variable and “surrounding dots” list. If the dot's ID is in the “surrounding dots” list, it will become yellow. If the dot is already yellow, it won't update anything.
current dot - for all sprites
Lists needed:
surrounding dots - for all sprites
Scripts:
1.

2.

3.

Explanation:
Every time the player draws on a new dot, it changes the “current dot” variable and “surrounding dots” list. If the dot's ID is in the “surrounding dots” list, it will become yellow. If the dot is already yellow, it won't update anything.
Last edited by Thingied (Feb. 5, 2022 22:16:41)
- MisterCrabby
-
Scratcher
4 posts
Limiting player movements
Can there be a way you could start the line from any dot. https://scratch.mit.edu/projects/636003643/editor here is a better version
- Discussion Forums
- » Help with Scripts
-
» Limiting player movements


