Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to make a boolean block true
- PepsiPopsi
-
Scratcher
5 posts
how to make a boolean block true
i'm having a really hard time with tying to make boolean blocks true.
i looked at a few other disscusions and got this:
i'm so clueless!
i looked at a few other disscusions and got this:set [ my varible] to ((1) - (1))
if <key [ space] pressed?> then
jump
end
i'm so clueless!
- Dezach
-
Scratcher
100+ posts
how to make a boolean block true
This should work if your issue is “not jumping when key pressed”:
when green flag clicked
forever
if <key [space v] pressed?> then
jump
end
end
when [space v] key pressed
jump
- RapTapWithoutANap
-
Scratcher
37 posts
how to make a boolean block true
i'm having a really hard time with tying to make boolean blocks true.Here's a simple understanding, Boolean variables are variables with 2 states 0 and 1. All the other discussions didn't get it right, a single bit.i looked at a few other disscusions and got this:
set [ my varible] to ((1) - (1))
if <key [ space] pressed?> then
jump
end
i'm so clueless!
Example with jumping :
when green flag clicked
forever
if <touching [sprite ground] ?> then
set [(LOCK)] to [1]
end
end
when green flag clickedBasiclly it uses set 1 and 2 on the variable and no operators.
forever
if <key [space] pressed?> then
[The sprite should jump]
end
end
- RapTapWithoutANap
-
Scratcher
37 posts
how to make a boolean block true
Also if the (Player) jumps and the lock if the lock is at 1, and if it's at 0 you can't jump. (Or if lock is at 0 you can jump, and you can't jump if lock is at 1)i'm having a really hard time with tying to make boolean blocks true.Here's a simple understanding, Boolean variables are variables with 2 states 0 and 1. All the other discussions didn't get it right, a single bit.i looked at a few other disscusions and got this:
set [ my varible] to ((1) - (1))
if <key [ space] pressed?> then
jump
end
i'm so clueless!
Example with jumping :when green flag clicked
forever
if <touching [sprite ground] ?> then
set [(LOCK)] to [1]
end
endwhen green flag clickedBasically, it uses set 1 and 2 on the variable and no operators.
forever
if <key [space] pressed?> then
[The sprite should jump]
end
end
Work with the solution
repeat until <Success>
[scratchblocks] Congratulate [/scratchblocks]
end
- Discussion Forums
- » Help with Scripts
-
» how to make a boolean block true


