Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Side Scrolling Poisition Detection
- ARBOR_DOOMSDAY
- Scratcher
34 posts
Side Scrolling Poisition Detection
Hello, I was wondering if there happens to be a way to detect the x and y position that a clone would have when scrolling off a screen due to the fact that it can't.http://scratch.mit.edu/projects/20066121/#editor. That is my project I need the gravity sprite to detect the x and y positions of the place the planetoid would be if it could actually scroll off screen.
Last edited by ARBOR_DOOMSDAY (April 3, 2014 13:16:06)
- TheDusk
- Scratcher
64 posts
Side Scrolling Poisition Detection
There's a problem we all wish we could solve, you see, we can't make variables appear with clones and be able to be accessed by all sprites, it can only be accessed by the clone. Because cloning does not create a separate sprite, it pretty much just makes a moveable stamp, it isn't considered a sprite, so it can't have it's own variable for all sprites, just itself. Now if you want to just have it for the clone then just make a variable, set it to “this sprite only” and then put it into the clone's scripting.
- ARBOR_DOOMSDAY
- Scratcher
34 posts
Side Scrolling Poisition Detection
I used lists to compile data from clones and that is working, but the gravity sprite is not compiling the data properly.
OOH. Just fixed it. I had a global variable instead of a private variable for each clone to edit.
OOH. Just fixed it. I had a global variable instead of a private variable for each clone to edit.
Last edited by ARBOR_DOOMSDAY (April 3, 2014 18:51:07)
- Discussion Forums
- » Help with Scripts
- » Side Scrolling Poisition Detection