300 questions
-1
votes
0
answers
77
views
Convert a 2D point (x, y) to 3D coordinates on plane y=-50
I have a 3D rasterization rendering program on scratch.mit.edu, which has proper movement and rotation matrices for yaw and pitch (not roll). The grid is located on y=-50, and I have near plane and ...
4
votes
1
answer
144
views
How to get a JavaScript "days since 2000" that is identical to that of Scratch's block of the same name?
What do I need to do to make a "days since 2000" JS function that provides a value identical to that provided by the reporter in Scratch?:
The Scratch Wiki page states that
It reports the ...
1
vote
1
answer
49
views
Determine drop validity on a Scratch game tile grid
I'm trying to make a game where I drag tetris like blocks onto a grid.
When a new piece is dragged onto the board, I'm trying to determine if the game piece is valid in the current location.
I have a ...
1
vote
0
answers
61
views
Can I create a list in a Scratch extension?
I'm developing a Scratch extension that will add some very useful features to the game. However, right now I'm trying to create a reporter that will split a string into a list at a certain character. ...
0
votes
1
answer
148
views
Making a grid of dots on Scratch
I would like to make a grid of dots based on a numerical input on Scratch, and I would like to make all of the dots clickable to change in between 2 states: red or blue. For example, if I input the ...
-1
votes
2
answers
120
views
I’m trying to make a Save/Load feature in my game but it only saves locally
I’m trying to make a Save/Load system, and it works locally. For example, if you play, then you save, it saves. You can then press load and if you enter the save code, it will load. The problem is if ...
0
votes
1
answer
129
views
Why when i put a variable block into a statement block the value changes from 50,000 to 0?
Im making a cookie clicker game and i have cookie per click upgrades, there is a cost that starts at 50,000 cookies then everytime you buy it, it multipies by 100. But when i put the cost variable ...
-1
votes
1
answer
147
views
How to Load Project Files into the Editor when the Scratch app starts?
I have a .sb3 file that is returned from an API, and I want to load it into the editor when the app starts.
It seems that I need to set the project files into scratch-storage, but I am not sure if ...
1
vote
2
answers
161
views
Scratch - Generator random numbers and allocating them in a if/else conditional statement
I am trying to have it autogenerate a number, if that number is a 1 then it throws a strike, if that number is a 2 then it throws a ball.
Currently it gets stuck on either a 1 or 2 and just throws a ...
1
vote
1
answer
141
views
Incorrect result percentage simulating the birthday paradox
I saw a video about the birthday problem where if you had a room with 23 people, there is a 50% chance that two people share a birthday. Rather than just understanding the math, I wanted to run a ...
-5
votes
1
answer
334
views
How to get someone's Computer Username in JavaScript. Like the "whoami" Command in CMD
I'm trying to make a meta game and for one of the planned scenes I want the player's name inside a book. The thing is... I'm using PenguinMod, a block programming language that has almost nothing to ...
-1
votes
2
answers
1k
views
Scratch: Broadcast message spawning more and more clones each time, how to fix
For some strange reason, clones duplicate other clones but does not do anything to add to a variable.
Click this to get the image, i cant embedd images yet. But I believe that this clone script ...
1
vote
2
answers
544
views
How to choose a random set of X and Y Coordinates that have been stored into 2 lists
I have been trying this code, but it does not do anything. I cannot for the life of me figure out how to choose a random number, and pull the X and Y coordinates out of the two separate lists based on ...
-1
votes
3
answers
81
views
How do I check if any of the objects in an array contain a specific value in a specific key, and if so get one of the other values of it?
I am making a python script with ScratchAttach to automatically answer a certain prompt on my profile, and I have gotten up to the point of getting messages from my profile. Now how do I check if the &...
0
votes
1
answer
141
views
Turbowarp's project_url parameter doesn't work
Wanted to upload a project to turbowarp anonymously
When I tried to load the page it just shows this error on the screen:
Oops! Something went wrong.
We are so sorry, but it looks like the page has ...
1
vote
1
answer
950
views
I've embedded a Scratch project into my website, but it come up with multiple warnings in the console. How can I resolve them?
I've embedded a Scratch project into my website using the iframe tag from the embed copy link in Scratch:
https://larakoseff.github.io/projects
https://github.com/larakoseff/larakoseff.github.io.git
...
0
votes
1
answer
1k
views
How do I duplicate a custom code block in Scratch?
I've got a custom code block that I've written in Scratch:
I want to duplicate my code block so that I can have a second version that is slightly different instead of having to create a whole new ...
-2
votes
1
answer
669
views
How to convert base-10 (decimal) to base-2 (binary) in Scratch?
I have the following function written in the Delphi Programming Language that converts a base-10 (decimal) number to a base-2 (binary) number:
function DecimalToBinary(Value: Int64): string;
const
...
0
votes
2
answers
277
views
How to get the absolute value of a number in Scratch?
I want to get the absolute value of a number in Scratch, meaning to drop the negative sign and convert all numbers to positive numbers.
"-1.5" would become "1.5"
"-4.56E100&...
0
votes
1
answer
92
views
Direct conversion between two bases
I am looking to convert between two bases in Scratch. I would like a direct conversion, not one that goes to decimal as an intermediate step. Is there an algorithm or function that can do this for any ...
0
votes
2
answers
1k
views
How do i fix this clone bug in Scratch?
So I was making a quiz game in scratch, I decided to clone the board that has the answer, but the clone just kept following each others, no matter how I fix it.
I tried using a "Wait until " ...
-2
votes
1
answer
499
views
Scratch score variable doesn't go up
I made a shooter game in Scratch, but my score variable doesn't go up when the plane shoots the enemy.
I use a clone for the enemy. The Score variable should go up when a Laser touches a UFO1 or a ...
1
vote
2
answers
617
views
Sprite in Scratch is non-smoothly "skipping" when being rotated
I am making a Squash game in scratch and I want the racket-sprite to always be straight "infront of me" as I move (with the mouse) around the court. This almost work with my code only that ...
-2
votes
2
answers
234
views
Costume of sprite in Scratch doesn't change
I am trying to make a simple game in Scratch, but I can't figure out why my costume isn't changing.
You can see what i tried in the photo but it isn't working.
0
votes
2
answers
118
views
Is there a way to get a triangle to rotate to face the mouse on a circle?
I'm trying to make it so that a triangle, with its two base points always staying on the outer edge of a circle, will point towards where the mouse is. I'm convinced it's mostly a specific math ...
0
votes
1
answer
117
views
How to save at multiple points? Saving the X, Y, what sprite (custom), and what text it was left off
I will try my best to explain my problem.
I'm trying to remake DDLC on Scratch and I have a hard time making a code that can save at anytime the user wants. Meaning, if I press S, then I save. I also ...
0
votes
3
answers
520
views
Is there a Scratch script or function that can detect the angle of a wall?
Im working on a 2D, non-scrolling, portal-themed platformer in scratch, and I was wondering if there was a function or script that I could make to help find the angle of a wall. As it stands, the ...
0
votes
1
answer
70
views
Would this be a reliable way of calculating the area from a point to a second point of an integral in Scratch?
So I was doing a coding exercise (in Scratch) for fun and decided to try to create a piece of code that would be able to calculate the area of a function f(x)=x y (where y is some constant) of the ...
2
votes
3
answers
2k
views
How to detect the x and y position of a clone?
I'm trying to make a marker that puts a number on each clone, so I can assign a life variable to each one, but I haven't been able of doing so. Any ideas?
I tried setting each clone to a different ...
0
votes
1
answer
127
views
Hidden account stuff in Scratch 3
Scratch 3.2 is buggy, the biggest bug being that the search bar taking up half the nav bar. I wonder what causes this bug.
I restarted my Chromebook and nothing happened. I cleared my cache and ...
0
votes
2
answers
84
views
How to compress 256^3 unique data points in order. Each data point is a value from 1 to 255
I am trying to compress 256^3 datapoints into a 256 digit or less long string (using only base 10 numbers). I have already tried a few things which I will list below.
I have tried to switch between ...
0
votes
1
answer
85
views
Is it possible to check every item in a list for an equation?
I am creating a script that is required to check if the the X or Y position of sprite minus the absolute value of anything in a list is is less than a particular value (The x or y for one of the ...
0
votes
1
answer
298
views
How do I change an "For all sprite" variable in a "When I start as a clone" hat block?
In the game I am programming, I added code that allowed me to tell a specific clone's X pos via a variable for all sprites. This way, I could tell another sprite where to move to. But the X pos ...
1
vote
1
answer
801
views
Why doesn't the sprite stay hidden after being touched?
I have this script in Scratch for a sprite (also viewable in MIT's editor):
When Kai touches the sprite it only disappears briefly, but then remains visible even though Kai is still touching it. Isn'...
0
votes
1
answer
278
views
Scratch not looping
I would like several sprites to move from left to right on a loop and start at different time.
Although I have used the "forever" control feature, it's not working. the sprites (baseball and ...
0
votes
1
answer
36
views
Terrain Generation fills up entire screen with a weird pattern instead of generating terrain
Code used for terrain generation
How it appears on testing
So, I tried to replicate Minecraft and I started with terrain generation. I tried using Perlin noise, but instead of generating Minecraft-...
0
votes
1
answer
506
views
Increase speed by 1 on each step
I need help with a Scratch algorithm that increments its step by 1 each time, first it takes 1 step, then 2 steps, then 3 steps and last 4 steps. you have commands like step forward 1 time, repeat 2 ...
0
votes
1
answer
120
views
Scratch Application(MIT)
In the Scratch application, how can I change the download directory to any other location when I click "save the file to the computer"? Additionally, I would like to save the project file to ...
0
votes
1
answer
70
views
How to add a loop for a replay button in a music player in scratch
I made a music player in scratch, that fast forwards and rewinds 4 songs in a playlist. I tried creating a replay button that replays the same song over and over when it’s pressed till it’s pressed ...
-7
votes
3
answers
1k
views
How to make a button in a Scratch that takes you to some website?,
I know that this won't work in a normal Scratch. Maximum with Turbowarp, but there is one problem. Turbowarp makes JavaScript out of Scratch, and unfortunately I don't know this language. What should ...
0
votes
1
answer
913
views
Repeat loop in Scratch doesn't work for me
Image
I have a problem with repeat loop. If I write this code 10 times it works but, I face bugs when I use a repeat loop. Can someone help? Is there any settings which I need to change to use repeat ...
0
votes
1
answer
549
views
Scratch sprite won't stop movement
I am making a Scratch Mit project where a sprite is supposed to come as a monster, I have controlled its custom movement using the repeat block although once it goes out of my desired animation, it ...
-1
votes
1
answer
786
views
My scratch project isn't taking key input
enter image description here
Here is the link : https://scratch.mit.edu/projects/859974239/editor
I have made a scratch project where i have used a if "x" key pressed ,the broadcast "...
0
votes
1
answer
1k
views
Clone Duping glitch
I am trying to make a clicker game on scratch and I made a click effect that is a mini version of the button that floats to the bottom of the screen. I got everything worked out except for one thing. ...
0
votes
1
answer
255
views
How can I fix my drag-and-drop system in Scratch to work properly for my Plants v.s Zombies mod?
Like I have stated here, I am trying to create a Plants v.s Zombies mod in Scratch. However, the main issue still seems to be that the drag and drop system just does not seem to want to work. (This ...
0
votes
1
answer
1k
views
How do I make a functional drag-and-drop system
Background information
Like I have stated before here, I am trying to create a Plants vs. Zombies mod in Scratch. My main concern still seems to be attempting to create the drag-and-drop system (...
3
votes
2
answers
588
views
How do I write factorials in Scratch?
So I was taking a break from my PvZ project in Scratch and trying to see what I could do in Scratch. So here's the thing: I sort of wanted to see if I could make a converter from say, sin(x°) to sin(...
3
votes
1
answer
339
views
Is Scratch's (sin of (n)) function incorrect, or am I doing something wrong?
I found a double pendulum ODEs simulation on Desmos, credit to @AlexRLJones, and I am trying to recreate it entirely in Scratch.
While writing the code, I noticed that when I put sin(θ₁) with θ₁=50 on ...
0
votes
2
answers
572
views
Is this a valid method for setting a value to "true" in Scratch?
So I have started to create a Plants v.s Zombies mod in Scratch. My main concern right now is attempting to figure out how to code a drag and drop system (i.e. clicking the seed packet and then drag ...
1
vote
1
answer
124
views
how to make an enemy independently moved by an inverted screen movement made by the player
What I'm trying to make
In mit-scratch I'm making an Isometric game with an arena as the main part of the game idea, the player would be going around killing enemies while being unable to pass through ...