Discuss Scratch

MInecraft_2233
Scratcher
3 posts

How to make the vaiable the other way

I want to make this sound with the wellerman song where the left/right pan moves with the scratch cat at the but i get stuck when the variable goes like (E.G.) -542.
here is the link if you know how https://scratch.mit.edu/projects/1018414688/editor/

Last edited by MInecraft_2233 (May 12, 2024 14:30:03)


move (MInecraft_viewer(AKA Riley)) steps
BigNate469
Scratcher
1000+ posts

How to make the vaiable the other way

By the way, (0) - (number) works slightly faster than join (-) (number), because it can actually be done on a hardware level easily.
You might want to combine all the code under the when clicked blocks into one, because that way the order that they run in is known. For some of them, you may also want to use the
when green flag clicked
block instead.
As for your question, what do you mean “the other way”? Do you mean stopping the variable from increasing when it reaches a certain value?
Also, reconstructing your code will help, since you have a lot of blocks that are just floating around and it's hard to tell where they're supposed to go.
One more thing: this should be in Help with Scripts. I'll report (don't worry, reporting works differently on the forums, you won't be in trouble) it to be moved there for you.

Highlight any part of this signature and press ctrl+shift+down arrow to see the rest of it
forever
if <person asks [what's a signature] :: sensing> then
Redirect to [https://en.scratch-wiki.info/wiki/Signature] :: motion
end
end
Please read the list of Officially Rejected Suggestions before posting a suggestion for Scratch! 100th post
This signature is designed to be as helpful as possible.
View all of the topics you've posted in:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=topics
View all of your posts:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=posts
Forum tips:
Don't post in topics where the latest post is over ~2 months old, unless you have something critical to add. Especially in topics that are several years old- it isn't helpful, and is known as necroposting.
Don't post unrelated things in topics, including questions of your own. Make a new topic for your questions.
You can use the
 [color=color name or hexadecimal value here] and [/color] 
tags to color text.
Lesser-known Scratch URLs:
https://scratch.mit.edu/projects/PROJECT ID HERE/remixtree (replace “PROJECT ID HERE” with project id number. Shows all the remixes of the project, and the remixes of those projects, and the remixes of those projects, and so on, as a chart. Link currently redirects to one of my projects)
View a larger list at: https://scratch.mit.edu/discuss/topic/542480/
Why @Paddle2See's responses are so often identical: https://scratch.mit.edu/discuss/topic/762351/
1000th post
MInecraft_2233
Scratcher
3 posts

How to make the vaiable the other way

I mean lets say you have a variable at -6
set [ v] to [-6]
and I want the variable to be at 6,
set [ v] to [6]
I want to know if there is a way to take away the minus from the variable

move (MInecraft_viewer(AKA Riley)) steps
deck26
Scratcher
1000+ posts

How to make the vaiable the other way

MInecraft_2233 wrote:

I mean lets say you have a variable at -6
set [ v] to [-6]
and I want the variable to be at 6,
set [ v] to [6]
I want to know if there is a way to take away the minus from the variable
([abs v] of (-6))

The abs function gives the positive value of the input so leaves positive values untouched but converts negative values to positive.

Last edited by deck26 (May 13, 2024 07:44:10)

MInecraft_2233
Scratcher
3 posts

How to make the vaiable the other way

IT WORKS THANK YOU!!!

Last edited by MInecraft_2233 (May 13, 2024 08:24:27)


move (MInecraft_viewer(AKA Riley)) steps

Powered by DjangoBB