Discuss Scratch

SuperDoom
Scratcher
1000+ posts

___ or ___ but not both block

+0
Workaround:
<<<> or < >> and <not <<> and < >>>>

WARNING: Anything I post is either stupid, sarcastic, or ironic. I am not to be taken seriously. Feel free to make fun of me for anything I say.
“Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.”
essentiallibertyisfreedomofspeech~Benjamin Franklin (This is my motto for replying to suggestions.)
As of 83G1NN1NG/0F/71M3, I use color #322F31 for my posts. If it's a link, I use #1AA0D8.
CLICK THIS LINK TO INSTANTLY CRASH THE SERVERS
Alexa, play Space Invaders.
300035004000
As of November 7th, 2019, I have my computer back.
I'm awake from 11:00 AM to 11:30 PM CST (12:00 PM to 12:30 AM EST). Please be more active during that time.
I've moved to -THENEXT_LEVEL-.
Nether_before
Scratcher
1000+ posts

___ or ___ but not both block

Semi support, seems useful and less messy but there's an easy workaround.

~~If life gives you kumquats, lock your signature up, bury it in the ground and hope it's safe~~
hello child. i am an elf
rdococ
Scratcher
100+ posts

___ or ___ but not both block

No support.

Just use this:
<not <(x) = (y)>>
replacing x with the first boolean to test, and y with the second.
14152cool
Scratcher
100+ posts

___ or ___ but not both block

bump!

Annoyingly, my signature was eaten by a small, white dog. How annoying.




codeman1044
Scratcher
1000+ posts

___ or ___ but not both block

You could use something like this:
<<<(value1)=[true]> or <(value2)=[true]>>and<not<(value1)=(value2)>>> 
Basically word for word what you're requesting.
Almost all (if not all) logic gates can be made using <and> and <not>

Last edited by codeman1044 (May 17, 2019 17:41:44)


This is my signature, which shows up every time I post and is automatic.
I'm not going to be as active anymore…
I am a bot, and this action was performed automatically. Just kidding! Fake news!.
Last signature edit: March 19, 2020 1000th post
I like being formal, though I'm usually not formal anywhere but here. Sorry if I come across as harsh, as I don't intend to.
Plug time! https://scratch.mit.edu/projects/280489344/
Current WIP (may be out of date): click!
Games_Frosch
Scratcher
21 posts

___ or ___ but not both block

I find that an xor block would be useful to have in scratch. I definatly support that topic! Of course you can do {if 1 or 2 and not 1 and 2} but an xor block would be quicker, easier and very useful.
--Explosion--
Scratcher
1000+ posts

___ or ___ but not both block

Workaround:
<((<boolean #1::grey>) + (<boolean #2::grey))=[1]>
Note, I am not block spamming or not supporting this suggestion because there is a workaround, I am simply providing the workaround to add to this discussion
Bacteria999
Scratcher
500+ posts

___ or ___ but not both block

Isn't xor the same thing as ≠?

<[2] ≠ [1]  :: operators>

Last edited by Bacteria999 (April 7, 2020 16:30:21)


coder2045
Scratcher
1000+ posts

___ or ___ but not both block

<not <[] = []>>
Done.

(° °) (ಠ_ಠ) Kumquat Army
Power: 2836
Seth_Zaw
Scratcher
100+ posts

___ or ___ but not both block

Workaround:
<not <<a> = <b>>>

All the triangular numbers 1 - 55:
1, 3, 6, 10, 15, 21, 28, 36, 45, 55
1+3=4=2²
3+6=9=3²
6+10=16=4²
10+15=25=5²
I see a pattern.
when Scratch [4.0 v] comes out :: events hat
remove [wings v] from [hippo v] sprite
Games_Frosch
Scratcher
21 posts

___ or ___ but not both block

The xor block would be useful for many numbers. {If 1 or 2 or 3 and not 1 and 2 and not 1 and 3 and not 2 and 3} if quite long even though there are only 3 numbers. Maybe you need 100 numbers! Imagine that! {If 1 or 2 or 3 or 4 or 5 or 6… or 100 and not 1 and 2 and not 1 and 3 … and not 1 and 100 and not 2 and 3 and not … 2 and 100 …….. and not 99 and 100} That would take AGES only for that block!
Bacteria999
Scratcher
500+ posts

___ or ___ but not both block

can anyone answer my question?

Last edited by Bacteria999 (April 7, 2020 18:53:36)


Super_Scratch_Bros20
Scratcher
1000+ posts

___ or ___ but not both block

if <<> or <>> then
if <not <<> and <>>> then

end
end

Edit: Here's a simple workaround I discovered. Of course, this may help with experienced Scratchers. But as for new Scratchers, the concept of XOR may be found complicated, especially if they don't know what they're doing. It's simple to understand the concepts “and”, “not” or “or”, but they may not catch onto XOR, especially after Scratch got rid of the block identification thing after 3.0. (I don't remember what it's called. Sorry!)

Last edited by Super_Scratch_Bros20 (April 7, 2020 19:59:32)


Hello! I'm an AI creator, sprite ripper, sprite artist, Shovel Knight fan, Mega Man fan, Star Wars fan, pizza lover, cutscene and speech designer, and gaming enthusiast. Also, please, call me by my nickname, SSB20.

Playable Robot Master/Stardroid Sprites
Elec Man: The Video Game Studio
Project Bass Development Team
The Underrated Studio
Super_Scratch_Bros20 Fan Club
How SSB20 Are You?
Vote!
Super_Scratch_Bros20
Scratcher
1000+ posts

___ or ___ but not both block

-snip-

@Za-Chary* said that what I previously said was false.

Last edited by Super_Scratch_Bros20 (April 10, 2020 01:16:55)


Hello! I'm an AI creator, sprite ripper, sprite artist, Shovel Knight fan, Mega Man fan, Star Wars fan, pizza lover, cutscene and speech designer, and gaming enthusiast. Also, please, call me by my nickname, SSB20.

Playable Robot Master/Stardroid Sprites
Elec Man: The Video Game Studio
Project Bass Development Team
The Underrated Studio
Super_Scratch_Bros20 Fan Club
How SSB20 Are You?
Vote!
Za-Chary
Scratch Team
1000+ posts

___ or ___ but not both block

Super_Scratch_Bros20 wrote:

-snip-
No, that workaround is correct. If a and b are both false, then a = b and so not(a = b) is false. Similarly, if a and b are both true, then a = b and so not(a = b) is false. But if a is true and b is false (or vice versa) then a = b is false, making not(a = b) true. Thus the script runs as intended — if exactly one is true, then it returns true, otherwise it returns false.

University of Minnesota Mathematics major, Scratch Team member, and Nintendo enthusiast.

Za-Chary's Game Museum
The Official List of Rejected Suggestions
Interesting mathematics I am currently studying [updated 5/27/2020]
Bacteria999
Scratcher
500+ posts

___ or ___ but not both block

Isn't xor the same thing as ≠?

<[2] ≠ [1]  :: operators> 



Hello? Can anyone answer my question?

Last edited by Bacteria999 (April 8, 2020 21:12:47)


lisa_wolfgang
Scratcher
100+ posts

___ or ___ but not both block

Bacteria999 wrote:

Isn't xor the same thing as ≠?

<[2] ≠ [1]  :: operators> 
No.
XOR compares two booleans and returns true if one or the other (not both) is true.
≠ compares two values (which can be booleans) and returns true if they are not equal.
However, they do return the same results when using booleans, so that's why the ≠ workaround works.

Last edited by lisa_wolfgang (April 8, 2020 21:57:32)



Want to try the stage on the left again? Go here for instructions.
lisa_wolfgang
Scratcher
100+ posts

___ or ___ but not both block

NOTE TO ALL FUTURE REPLIERS:
The following workarounds have already been proposed and tested. Please don't suggest these again; rather, contribute to the discussion about adding an XOR block to the blocks palette in the Scratch editor.

<not <<boolean1> = <boolean2>>>

<<<boolean1> or <boolean2>> and <not <<boolean1> and <boolean2>>>>


Want to try the stage on the left again? Go here for instructions.
trieuminh
Scratcher
9 posts

___ or ___ but not both block

No support. Just use a workaround.
<not <[var] = [var2]>>

bold italic underline strikethrough

Someone wrote:

Something.
define something
forever
set pen color to [#0b4861]
play sound [meow v]
change [color v] effect by (25)
go [before v] [forever v] :: motion
pen::pen
music::music
end
lisa_wolfgang
Scratcher
100+ posts

___ or ___ but not both block

*sighs*


Want to try the stage on the left again? Go here for instructions.

Powered by DjangoBB

Standard | Mobile