Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » The Pen Up Button is not working in my project. What did I do wrong?
- salvation_
-
Scratcher
100+ posts
The Pen Up Button is not working in my project. What did I do wrong?
Either my redrawing function does not work, or my encoding function does not work. Here is the link Draw! ps. The redrawing function runs after you click space, and the encoding happens as you draw.
- gor-dee
-
Scratcher
1000+ posts
The Pen Up Button is not working in my project. What did I do wrong?
click the tick box to show the ‘pen down’ list and you'll see what you've done (or not done)
- salvation_
-
Scratcher
100+ posts
The Pen Up Button is not working in my project. What did I do wrong?
click the tick box to show the ‘pen down’ list and you'll see what you've done (or not done)The list can be a couple thousand list items between pen breaks; So I can not solve this problem by looking at the list. I have to use math.

- Cutie_Pooge
-
Scratcher
500+ posts
The Pen Up Button is not working in my project. What did I do wrong?
Can't you make a separate list that detects every frame if mouse is down or not and when drawing, the computer pen ups when the frame of that list says that mouse is up?
- salvation_
-
Scratcher
100+ posts
The Pen Up Button is not working in my project. What did I do wrong?
Can't you make a separate list that detects every frame if mouse is down or not and when drawing, the computer pen ups when the frame of that list says that mouse is up?Scratch has a 200,000 list item limit. I would reach the limit In a little less than 2 hours. So that might work… Question do you think a lot of users will spend that long on my drawing project? Probably not right? I will try that and see if it works

- salvation_
-
Scratcher
100+ posts
The Pen Up Button is not working in my project. What did I do wrong?
Thanks! 

Last edited by salvation_ (July 21, 2020 03:51:37)
- salvation_
-
Scratcher
100+ posts
The Pen Up Button is not working in my project. What did I do wrong?
Can't you make a separate list that detects every frame if mouse is down or not and when drawing, the computer pen ups when the frame of that list says that mouse is up?I tried it and the project acted strangely. Can you check it out? In sprite1 change the mesage under the
when green flag clickedfrom
when I receive [ message 2 v]to
when I receive [ message 1 v]
Then it will run the code with the changes you proposed.

I do not know why it did not work, it should have.
Last edited by salvation_ (July 21, 2020 04:17:43)
- Cutie_Pooge
-
Scratcher
500+ posts
The Pen Up Button is not working in my project. What did I do wrong?
I checked, your list doesn't delete the stored data so when you run your project you have already defined the data. Also you should pen up before going to 0,0 otherwise it looks good.
- Cutie_Pooge
-
Scratcher
500+ posts
The Pen Up Button is not working in my project. What did I do wrong?
I fixed it. My remix operates a bit different than yours, it stores the data every frame so that it can draw lines, otherwise it would draw only points. Hopefully it is as you wanted.
- gor-dee
-
Scratcher
1000+ posts
The Pen Up Button is not working in my project. What did I do wrong?
I checked, your list doesn't delete the stored data so when you run your project you have already defined the data. Also you should pen up before going to 0,0 otherwise it looks good.This what what I thought you would see! You start by clearing all the lists but you forgot this one!
- marcelzietek2006
-
Scratcher
500+ posts
The Pen Up Button is not working in my project. What did I do wrong?
- salvation_
-
Scratcher
100+ posts
The Pen Up Button is not working in my project. What did I do wrong?
I fixed it. My remix operates a bit different than yours, it stores the data every frame so that it can draw lines, otherwise it would draw only points. Hopefully it is as you wanted.Thanks! In my project I would need to keep the information that you delete. But I think I can do that, while still keeping the same code.

ps. I still have no clue why my code did not work. And I do not understand how your code works. But thanks!
- Discussion Forums
- » Help with Scripts
-
» The Pen Up Button is not working in my project. What did I do wrong?