Discuss Scratch

Ninfuzz
Scratcher
3 posts

x position and y position blocks won't show the sprite I have selected! Please help!

So for this game I made I made it so when the bat is on one side of the screen it will face one way, and when it's on the other it will face the other way. I did this with the y position as well. It worked with the first bat, with the second bat it didn't but I figured it out somehow, and with the third it didn't work. There is 1 bat for each different mode, and with the other bats working the way they should, and the one mode not is very upsetting.
This is my code for doing the things, it works so I don't need help on that, but the x position and y position blocks aren't showing the sprite I have selected.

when I receive [ v]
forever
if <([x position v] of [Sprite1 v]) < [0]> then
point in direction (90 v)
end
if <([x position v] of [Sprite1 v]) > [0]> then
point in direction (-90 v)
end
end
Like I have said atleast 3 times now when I try to use an x position of, or y position of block it doesn't show the sprite that I am putting the code in in the selections for which sprite I can use and I don't know why.
here is a link to the game if you want to play it yourself, its still a WIP, so it may not be the best, which is why I'm trying to figure out this issue right now.
The game
Mittensbrother
Scratcher
100+ posts

x position and y position blocks won't show the sprite I have selected! Please help!

Check out your Sensing blocks on the x position checks - on the ‘Bat3’ sprite, the scripts are sensing the position of the ‘Bat2’ sprite.

([x position] of [Bat2])
Ninfuzz
Scratcher
3 posts

x position and y position blocks won't show the sprite I have selected! Please help!

Mittensbrother wrote:

Check out your Sensing blocks on the x position checks - on the ‘Bat3’ sprite, the scripts are sensing the position of the ‘Bat2’ sprite.

([x position] of [Bat2])
I know it says that, its because the option for bat3 isn't showing up, I was hoping someone could tell me what's wrong and how to fix it.
Ninfuzz
Scratcher
3 posts

x position and y position blocks won't show the sprite I have selected! Please help!

ok so when I went back to check the project to see if it would show up for me now I saw an x position of block in the top left corner, it said of bat3, so since it still wouldn't show up for me I duplicated this block a bunch of times. in short, my problem is in someway fixed, but it still won't show up for me.
Mittensbrother
Scratcher
100+ posts

x position and y position blocks won't show the sprite I have selected! Please help!

My mistake- the option for ‘Bat3’ won't show up in that sense block because the script is on the ‘Bat3’ sprite. Instead, you can use the ‘X Position’ motion block as the variable.

Last edited by Mittensbrother (Feb. 9, 2018 03:23:15)

Powered by DjangoBB

Standard | Mobile