Discuss Scratch

Haloboy01134
New to Scratch
4 posts

Touching sensing not working at times

I am currently working on a game which needs to use the ‘touching’ sensing script. When it touches the floor (which is in parts, all individual sprites) it sets a variable that stops them falling further. However, when it touches the sprite, it registers as both touching and not touching the sprite, which makes it fall through it and my game not work.

If it helps, this is what I was doing:
  • I used two sprites to act as legs.
    There are several sprites to act as the floor, which is necessary for my game.
    When the ‘legs’ touch any one of the sprites, it sets a variable to stop the legs falling any further.
    However, when the legs touch the floor, they seem to register as both touching and not touching the floor.
    This makes them fall through the floor.
    I have tried using colour sensing and sprite sensing, neither have worked.
    Fixed Y solutions would not work.
If you can, please help, as I am unsure of whether or not this is a bug, but I am pretty sure it is.
gigapouch
Scratcher
1000+ posts

Touching sensing not working at times

Try putting the sensing block into a
forever

end
block.

I have a Steam account. If you have one too, feel free to add me to your friends list.
Also check out my YouTube channel if you like the outdoors, Minecraft, cars, roller coasters, etc.
DadOfMrLog
Scratcher
1000+ posts

Touching sensing not working at times

If your sprites are rotated (i.e. using “point in direction…”, or “point towards…”), then you may be running into this Scratch bug: http://scratch.mit.edu/discuss/topic/30769/

If so, the workaround for now is to insert a “show” block just before any touching checks.



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

Haloboy01134
New to Scratch
4 posts

Touching sensing not working at times

I've figured it out now

I just messed up with the sensing and was trying to detect the wrong sprite
Thanks for helping, anyways people!
SwagManMLG
New to Scratch
1 post

Touching sensing not working at times

I click on sensing and it just says mouse pionter and edge plz help
KrishR25
Scratcher
1 post

Touching sensing not working at times

Same thing is happening to me too.
DrKat123
Scratcher
1000+ posts

Touching sensing not working at times

KrishR25 wrote:

Same thing is happening to me too.
Please don't necropost. The topic is old, and next time, please check the date of the topic before posting. Thanks.

Moving from Scratch? Don't learn C or Java, try Snap!
it haz OOP
DrKat McKatFace
First of all I'm 100% human and humans does not have a cat face
and second, the Boaty McBoatFace/Parsey McParseFace madness has just begun

λ
Sharp, my new Scratch mod
Is my post/siggy worthy for an internet?
Catsarefun
Scratcher
57 posts

Touching sensing not working at times

when green flag clicked
forever

move (10) steps
if <touching [A sprite ] ?> then

move (-10) steps
end

end
I do like this when I was making a car game.
if <> then

end
works sometimes without
forever

end
I noticed .
Catsarefun
Scratcher
57 posts

Touching sensing not working at times

I had a new block to show you!
It is <—-? sprite clicked>.
It is another block instead of :
when this sprite clicked.
Example:
when green flag clicked
forever
if <this? sprite clicked> then
play sound [meow]
end

end
Is this block ok? Tell guys if you agree.
Catsarefun
Scratcher
57 posts

Touching sensing not working at times

Same for:
(I receive (   v))
(started as a clone)
(repeated)
(flag clicked)
(All are in booleans (< >).
scratchUser1_2
New to Scratch
1 post

Touching sensing not working at times

Sensing still not working. My game is has 3 sprites. A moving cat, falling mice, and a ball. The ball moves when the spacebar is pressed like a projectile. I would like the sensing to detect when the ball hits a mouse, but cannot seem to get that functionality. Has anyone else figured out a way around this glitch?
LatiasRed
Scratcher
13 posts

Touching sensing not working at times

Oh, I'll try the

forever
if <touching [1 v] ?> then
broadcast [message 1 v]
end
end


(1 is the name of my sprite)

Last edited by LatiasRed (Aug. 25, 2017 15:37:37)


if <(user reading) = [true]> then
hide
stop [all v]



else
say [hi]

end

Roblox: SuperPuppy25605
TheTrialsOfGames
Scratcher
1 post

Touching sensing not working at times

sensing color and sprites will not work. HELP!!!!
codeman1044
Scratcher
1000+ posts

Touching sensing not working at times

Welcome to the forums! Please don't post on old and answered topics, as it can hide other ones that need an answer. This is called necroposting. Next time, please create your own topic for people to answer.

This is my signature, which shows up every time I post and is automatic. To make a signature of your own, locate the “Change your signature” option in the bottom left of the Discussion Home.
I am nothing if not consistently inconsistent.
Snap! is a website that offers block coding like Scratch, but also offers the creation of your own blocks and writing JavaScript functions. The adventurous should consider checking it out!
Potentially useful tutorials and topic coverage
If you want to see a new tutorial added to this, feel free to leave a suggestion on my profile.
deck26
Scratcher
1000+ posts

Touching sensing not working at times

codeman1044 wrote:

Welcome to the forums! Please don't post on old and answered topics, as it can hide other ones that need an answer. This is called necroposting. Next time, please create your own topic for people to answer.
Also share your project so we don't have to guess.
Hokyhans
New to Scratch
1 post

Touching sensing not working at times

gigapouch wrote:

Try putting the sensing block into a
forever

end
block.
best person ever
Happypants911
Scratcher
5 posts

Touching sensing not working at times

HELP ME HELP ME I TRIED A BILLION TIMES WITH THIS CODE
when green flag clicked
if <touching [ v] ?> then

stop [ v]
end
IT STILL DOESNT WORK GRR

Last edited by Happypants911 (Sept. 2, 2020 20:45:30)

Happypants911
Scratcher
5 posts

Touching sensing not working at times

and also tried with forever block, too
theanonymousweirdo
Scratcher
500+ posts

Touching sensing not working at times

Happypants911 wrote:

HELP ME HELP ME I TRIED A BILLION TIMES WITH THIS CODE
when green flag clicked
if <touching [ v] ?> then

stop [ v]
end
IT STILL DOESNT WORK GRR
Please create your own topic instead of posting on an old one.

This is my signature. It appears at the bottom of all of my posts.
My favorite song: You're Not Alone
RAYMANROCKZ
New to Scratch
2 posts

Touching sensing not working at times

I put a code and it didn't work. I put dino touching meteor and it didn't work the code until there. PLZ help :c

Powered by DjangoBB