Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Weird Fencing Bug
- Cedar_
-
Scratcher
2 posts
Weird Fencing Bug
I'm making a project that involves setting a sprite's X and Y position to a variable. However, there is something weird going on with the sprite fencing. I know how to fix it, but I have no idea why it happens. The costume used while setting the X and Y is a blank costume, and the size used is 100%. The code somewhat resembles this:
And the result is the X and Y get set to 0.
There are two EXTREMELY weird things that happened as well as this.
1. The sprite's maximum X value is 480, and the minimum Y value is -360. It seems like somehow the fencing got shifted down and right.
2. Trying to increase the size past 100 while moving it just moved the fencing even further down and right.
FIX:
For some reason, setting the costume to one that isn't blank fixes it temporarily.
Editing the blank costume fixes it permanently.
Can someone please try figure out why this is happening?
set [variable v] to [-50]
set x to (variable)
set [variable v] to [100]
set y to (variable)
And the result is the X and Y get set to 0.
There are two EXTREMELY weird things that happened as well as this.
1. The sprite's maximum X value is 480, and the minimum Y value is -360. It seems like somehow the fencing got shifted down and right.
2. Trying to increase the size past 100 while moving it just moved the fencing even further down and right.
FIX:
For some reason, setting the costume to one that isn't blank fixes it temporarily.
Editing the blank costume fixes it permanently.
Can someone please try figure out why this is happening?
Last edited by Cedar_ (Sept. 10, 2023 14:03:40)
- ventoaurum
-
Scratcher
100+ posts
Weird Fencing Bug
when i recreated this scenario in a new project, the problem didn't happen.
maybe share the project so we can look at what's causing the problem exactly.
maybe share the project so we can look at what's causing the problem exactly.
- Cedar_
-
Scratcher
2 posts
Weird Fencing Bug
when i recreated this scenario in a new project, the problem didn't happen.here you go:
maybe share the project so we can look at what's causing the problem exactly.
https://scratch.mit.edu/projects/891302960/
- Discussion Forums
- » Help with Scripts
-
» Weird Fencing Bug