Discuss Scratch

ScolderCreations
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

So yeah… The problems I have keep getting worse. Most bugs I know how to fix, and probably will, but I’ve postponed them all due to one crazy problem.

Trying to push any card other than the ones in the center does not work. I do not know why and I have tried several things, but I don’t think there’s anything I know how to do in order to fix it.

Link is on TurboWarp here because they haven’t patched unshared projects yet. Please help.

Also, please ignore any bugs other than the one I want to fix. I can do all the others, but right now I just need this one fixed.
musicROCKS013
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

Bump

Still need help with this?
ScolderCreations
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

musicROCKS013 wrote:

Bump

Still need help with this?
Yes. Thanks.
Alberknyis
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

I don't have time to properly analyse your project today but I will ask, what happens when you try to push a card not in the center? Are there multiple ways it can go wrong or is it the same kind of error no matter what?
ScolderCreations
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

Alberknyis wrote:

I don't have time to properly analyse your project today but I will ask, what happens when you try to push a card not in the center? Are there multiple ways it can go wrong or is it the same kind of error no matter what?
usually, it just replaces the card.
Alberknyis
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

I thought this was a puzzle game, but actually it is a horror game



I'll cut to the chase. This is the coordinates you use to *check* the validity of a push:


And here's the coordinates you use to actually *do* the push:


As you can probably guess the reason why pushes work only at the center is because that is where the two methods of calculating the coordinates give the same result
ScolderCreations
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

Oh, thank you. I understand now, when I get home I can probably fix that. Thank you!
ScolderCreations
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

Alberknyis wrote:

I'll cut to the chase. This is the coordinates you use to *check* the validity of a push:


And here's the coordinates you use to actually *do* the push:


As you can probably guess the reason why pushes work only at the center is because that is where the two methods of calculating the coordinates give the same result
Actually, the coordinates used to do the push are these:

ScolderCreations
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

bump
Alberknyis
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

I'll use that bump to add that this project would greatly benefit from the use of the mod operator.

The coordinates that you posted are the same as mine, I just cropped mine to make it easier to tell the critical difference.

To make it clear, when you push cards the coordinates you use are 3x the magnitude they should be.
ScolderCreations
Scratcher
1000+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

Alberknyis wrote:

I'll use that bump to add that this project would greatly benefit from the use of the mod operator.

The coordinates that you posted are the same as mine, I just cropped mine to make it easier to tell the critical difference.

To make it clear, when you push cards the coordinates you use are 3x the magnitude they should be.
That’s true. I’ll see what I can do.
Eagle138
Scratcher
500+ posts

Again, my terribly written project is broken (pushing cards) but now I added comments!

*stares intensely at code*
*confusion slowly increases*


Just a question, how does your ‘geni’ variable work/what is its function? I don't understand your code all that well but I suspect the problem is not with the movement, it's with the validation process being too closely aligned to a center push and returning an invalid value for a push that isn't in the center, causing all the cards to just yeet off to the side for some reason..

Actually, if it's not too much trouble could you please briefly explain the steps for pushing a card? (like pseudocode)

Powered by DjangoBB