Discuss Scratch

samizam
Scratcher
5 posts

Can someone please help me: Reward if you do.

https://scratch.mit.edu/projects/856145155 - This is the project I need help with.

In this project there is a bug where when you dies you keep losing lives in a wall in scene two, and I don't know how to fix it.

If you successfully fix it and send the link to me I will Heart, Star, (on all your projects) and follow you account!

Please help!
samizam
Scratcher
5 posts

Can someone please help me: Reward if you do.

Thank you

Last edited by samizam (April 24, 2024 17:14:23)

kiwilover2736
Scratcher
1000+ posts

Can someone please help me: Reward if you do.

samizam wrote:

someone pls helpppppp
Please be patient. The forums aren't the most active place, so it might take a bit to get a reply.

⋆˖⁺‧₊☽ Just a person who helps in and cleans up the Discussion Forums! ☾₊‧⁺˖⋆

⋆˖⁺ I reached 1000 followers in January of 2024 and made an QNA. I'm now done with answering all the questions, and here's the project for it! ⁺˖⋆

⋆˖⁺ One of my projects was featured! :‎D Check it out here! ⁺˖⋆

⋆˖⁺ Murder Drones fan!⁺˖⋆




———————————————————————————————————————————————

RANDOM SCRATCHERS OUT OF CONTEXT :‎D


Za-Chary once said..

Za-Chary wrote:

Could you remind us what scenes are in ScratchJr and what they do?

alphabetlorefan2003 wrote:

If this gets rejected, add this to Za-Chary!
After all, I AM the list of rejected suggestions.


And Paddle2See once said..

Paddle2See wrote:

This is not a question for this forum. It's a question for your lawyer.


~Congrats! You found secret links. These are just random images that i might use.~

u.cubeupload.com/eason_9_lol/SxrJFv.png
u.cubeupload.com/eason_9_lol/Wf472Y.png
u.cubeupload.com/eason_9_lol/a8wDJ4.png
testtubeguy9999
Scratcher
44 posts

Can someone please help me: Reward if you do.

Is the wall overlapping a spawn point? that might be the problem



I love science
And coding
samizam
Scratcher
5 posts

Can someone please help me: Reward if you do.

Im not sure but if it is i dont know how to fix it
GamesReinvented
New to Scratch
58 posts

Can someone please help me: Reward if you do.

samizam wrote:

https://scratch.mit.edu/projects/856145155 - This is the project I need help with.

In this project there is a bug where when you dies you keep losing lives in a wall in scene two, and I don't know how to fix it.

If you successfully fix it and send the link to me I will Heart, Star, (on all your projects) and follow you account!

Please help!
The problem is because you detect death collision with the animation costume. With wall collision you use a hitbox, so the hitbox doesn't go through the wall, but the animation sprite does go through the wall after you switch out of the hitbox, and since it goes through the roof it touches the spike through the roof.

The best solution for this is to switch to the hitbox sprite before checking if you are touching a sprite or enemy and this won't happen.

I see you are using griffpatch's tutorial for the platformer, so heres the scripts you change to make this work:
in the Tick last broadcast, remove this:
when I receive [Tick - Last v]
if <(x position) > (235)> then
Begin scene # ((SCENE #) + (1)) go to x, y (-235) () ::#FF6680
end
if <(x position) < (-235)> then
Begin scene # ((SCENE #) + (-1)) go to x, y (-235) ()::#FF6680
end
if <(y position) > (180)> then
Begin scene # ((SCENE #) + (100)) go to x, y () (-160)::#FF6680
end
if <(y position) < (-180)> then
Begin scene # ((SCENE #) + (-100)) go to x, y () (180)::#FF6680
end
if <touching (Danger v)? :: grey> then ::grey
broadcast [lose life v] :: grey // remove this, the blocks i made grey.
end
Now, go to the Tick - Player broadcast and add this:
when I receive [Tick - Player v]
moved by moving platform::#FF6680
switch backdrop to <touching (level v)?> // why is this here tho???
Controls - Up and Down::#FF6680
Controls - Left and Right ::#FF6680
Move - in steps (([abs v] of (speed x)) + ([abs v] of (speed y))) ::#FF6680
if <touching (Danger v)? :: grey> then ::grey
broadcast [lose life v] :: grey // add this, the blocks i made grey.
end
Set Costume ::#FF6680 // make sure this is under
This fixes the problem where you touch the spikes through a wall. There's another problem, when you have 2 lives and you restart level 2, you spawn inside of the wall and die because you can't move out. To fix this, go to the Reset and begin level block and change this script:
define Reset and Begin level //I can't make define blocks pink :\(
set [INVULNERABLE v] to (0)
set [speed x v] to (0)
set [speed y v] to (0)
set [falling v] to (99)
set [wall slide v] to (0)
set [jumping v] to (0)
set [long jump v] to (0)
point in direction (90) // change the speed x that was here v to spawn x.
Begin scene # (Spawn scene) go to x, y (Spawn x) (Spawn y) ::#FF6680
and this should fix all the problems.

(you don't have to give out prizes, most people here help because they want to.)
samizam
Scratcher
5 posts

Can someone please help me: Reward if you do.

Thank you so much
BladiPetrov
Scratcher
100+ posts

Can someone please help me: Reward if you do.

bro really tried to clickbait

Scripts in forum helper and math and logic enjoyer
@greenFlag @delInput @addInput @turnLeft @turnRight @loopArrow :: #fdcfdc hat
About me

I have scratched for 7 years straight. No urge to do something to get popular. Friendly, I know Spanish (my native language) and English (and a bit of French). I like to program things I really like, not trends or things for contests.
EDIT: Yeah, I know it says I joined 4 years ago, but I scratched before going online.
Paddle2See
Scratch Team
1000+ posts

Can someone please help me: Reward if you do.

Please note that using Scratch social actions (loves, favorites, follows) as payment for something is not what they are for - doing so is misleading. You can learn more reading our policy on this.

Scratch Team Member, kayak and pickleball enthusiast, cat caregiver.

This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.
(credit to Za-Chary)



;
samizam
Scratcher
5 posts

Can someone please help me: Reward if you do.

ok

Powered by DjangoBB