Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Wall Sensors
- Mateo_DLT
- Scratcher
11 posts
Wall Sensors
I am making an game about undertale, I need help setting the heart bounderies so the heart doesnt go outside the white box, the background is black, I tried putting the sensors and everything, you control the heart with the mouse, check out the game if you can and see if you can help me out.. thanks
- BananaCodingMaster
- Scratcher
100+ posts
Wall Sensors
when green flag clickedThat will make it move backwards
if <touching color [#FFFFFF] ?> then
change y by (-1)
end
BananaCodingMaster - The Ducknana
“Everybody in this country should learn to program a computer, because it teaches you how to think” -Steve Jobs
- BananaCodingMaster
- Scratcher
100+ posts
Wall Sensors
when green flag clicked
forever
if <touching color [#FFFFFF] ?> then
if <([ X position] of [Heart v]) = [X Top of the box ]> then
change x by (-1)
end
if <([ X position] of [Heart v]) = [ X Left side of the box]> then
change x by (-1)
end
if <([ Y position] of [Heart v]) = [Y Bottom of the box ]> then
change y by (1)
end
if <([ X position] of [Heart v]) = [ X Right side of the box]> then
change x by (-1)
end
end
BananaCodingMaster - The Ducknana
“Everybody in this country should learn to program a computer, because it teaches you how to think” -Steve Jobs
- BananaCodingMaster
- Scratcher
100+ posts
Wall Sensors
Could you also please share the project so I could remix it?
BananaCodingMaster - The Ducknana
“Everybody in this country should learn to program a computer, because it teaches you how to think” -Steve Jobs
- Mateo_DLT
- Scratcher
11 posts
Wall Sensors
Yes, Im almost done, thanks for helping but I found another way to do it, wait till i respond, then ull see when im finished
- BananaCodingMaster
- Scratcher
100+ posts
Wall Sensors
Okay
BananaCodingMaster - The Ducknana
“Everybody in this country should learn to program a computer, because it teaches you how to think” -Steve Jobs
- Mateo_DLT
- Scratcher
11 posts
Wall Sensors
Ya thanks, I just need to add the diolague but ill make it fancier later
- BananaCodingMaster
- Scratcher
100+ posts
Wall Sensors
Ok
BananaCodingMaster - The Ducknana
“Everybody in this country should learn to program a computer, because it teaches you how to think” -Steve Jobs
- Mateo_DLT
- Scratcher
11 posts
Wall Sensors
One more question, how do u make it so u can only skip dialogue with space bar?
- Mateo_DLT
- Scratcher
11 posts
Wall Sensors
How do you make it so that if you move you dont you dont get hurt, but if you do u get hurt?
- Discussion Forums
- » Help with Scripts
- » Wall Sensors