Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how do i make a sprite only moveable with arrow keys only when background is a specific one
- Digidragonhunter23
- Scratcher
50 posts
how do i make a sprite only moveable with arrow keys only when background is a specific one
i already tried
if backdrop number = 2 then
(insert moving code here)
but it isnt working so is there an error with the moving code or smthn else
if backdrop number = 2 then
(insert moving code here)
but it isnt working so is there an error with the moving code or smthn else
me whe:
- Digidragonhunter23
- Scratcher
50 posts
how do i make a sprite only moveable with arrow keys only when background is a specific one
project link https://scratch.mit.edu/projects/608953739/
me whe:
- deck26
- Scratcher
1000+ posts
how do i make a sprite only moveable with arrow keys only when background is a specific one
You're only checking the backdrop immediately after the green flag is clicked and then have a forever loop controlling the movement. It needs to be the other way round.
when green flag clicked
forever
if <(backdrop #) = []> then
movement code
end
end
- Digidragonhunter23
- Scratcher
50 posts
how do i make a sprite only moveable with arrow keys only when background is a specific one
ah i see, thanks!
me whe:
- Discussion Forums
- » Help with Scripts
- » how do i make a sprite only moveable with arrow keys only when background is a specific one