Discuss Scratch

MineBlox13
Scratcher
52 posts

Bigger map

how can you make is so you can make a place that can go further out. THANKS
PhirripSyrrip
Scratcher
500+ posts

Bigger map

I don't understand… do you think you could clarify? Thanks

Last edited by PhirripSyrrip (Aug. 17, 2013 22:53:08)

ProdigyZeta7
Scratcher
1000+ posts

Bigger map

*Bigger Map

MineBlox13 wrote:

how can you make is so you can make a place that can go further out. THANKS
It's called scrolling, and it's fairly easy to make.

You will need these variables:
  • ScrollX
  • ScrollY
  • x (local to the sprite only)
  • y (local to the sprite only)

For the sprite(s):
when green flag clicked
set [x v] to [0] //These don't have to be set to 0, they can be set to anything
set [y v] to [0]
forever
go to x: ((x) - (ScrollX)) y: ((y) - (ScrollY))
if <touching [edge v]?>
hide
else
show
end ifelse
change [x v] by (value)
change [y v] by (value)
end forever
For the Stage:
set [ScrollX v] to [0]
set [ScrollY v] to [0]
forever
if <key [right arrow v] pressed?>
change [ScrollX v] by (value)
end if
if <key [left arrow v] pressed?>
change [ScrollX v] by ((0) - (value))
end if
if <key [up arrow v] pressed?>
change [ScrollY v] by (value)
end if
if <key [down arrow v] pressed?>
change [ScrollY v] by ((0) - ((value))
end if
end forever
Hope that helps. If only [scratchblocks] worked again…

Last edited by ProdigyZeta7 (Aug. 18, 2013 03:25:49)

scubajerry
Scratcher
1000+ posts

Bigger map

Check this out http://scratch.mit.edu/projects/11629464/ It scrolls around a big map and just got featured
griffpatch_tutor
Scratcher
28 posts

Bigger map

I've started to create a number of example projects that try to address some of the requests that come my way. Multi directional scrolling is one of them. All the code is well commented and a link to the Scrolling Example is here: http://scratch.mit.edu/projects/12239450/

All the example projects I have scripted can be found here: http://scratch.mit.edu/studios/247443/

Perhaps you are after something a bit simpler though like that used in my cloud tanks game?

Griffpatch
MasterZi433
Scratcher
1 post

Bigger map

ProdigyZeta7 wrote:

*Bigger Map

MineBlox13 wrote:

how can you make is so you can make a place that can go further out. THANKS
It's called scrolling, and it's fairly easy to make.

You will need these variables:
  • ScrollX
  • ScrollY
  • x (local to the sprite only)
  • y (local to the sprite only)

For the sprite(s):
when green flag clicked
set [x v] to [0] //These don't have to be set to 0, they can be set to anything
set [y v] to [0]
forever
go to x: ((x) - (ScrollX)) y: ((y) - (ScrollY))
if <touching [edge v]?>
hide
else
show
end ifelse
change [x v] by (value)
change [y v] by (value)
end forever
For the Stage:
set [ScrollX v] to [0]
set [ScrollY v] to [0]
forever
if <key [right arrow v] pressed?>
change [ScrollX v] by (value)
end if
if <key [left arrow v] pressed?>
change [ScrollX v] by ((0) - (value))
end if
if <key [up arrow v] pressed?>
change [ScrollY v] by (value)
end if
if <key [down arrow v] pressed?>
change [ScrollY v] by ((0) - ((value))
end if
end forever
Hope that helps. If only [scratchblocks] worked again…

What do you mean by Value?
Basic0
Scratcher
5 posts

Bigger map

I don't know
———————–
when green flag clicked
if <((1) + (1)) = [2]> then

say [Donald Trump]
end
deck26
Scratcher
1000+ posts

Bigger map

Please note that the last serious response in this topic was more than two years ago. If you have questions it's probably better to start a new topic. The ‘value’ referred to by @ProdigyZeta7 is effectively a speed variable as it is what the scrollx and scrolly are changed by when you move.
Dreams32
Scratcher
1 post

Bigger map

yeah, could someone make a sequence of the blocks and attach it because that would be really useful for piecing together a scrolling game. I really would appreciate it.

Last edited by Dreams32 (June 6, 2018 13:45:23)

deck26
Scratcher
1000+ posts

Bigger map

Dreams32 wrote:

yeah, could someone make a sequence of the blocks and attach it because that would be really useful for piecing together a scrolling game. I really would appreciate it.
Suggest you start with the scrolling pages in the wiki and have a go at a simple x scroller initially. Then create your own topic here rather than necroposting to ask any questions.
zenkoder
New Scratcher
2 posts

Bigger map

help, i dont get it
deck26
Scratcher
1000+ posts

Bigger map

zenkoder wrote:

help, i dont get it
Please, if you have a question, create your own new topic rather than posting on an old topic. Describe your problem and share the project.
zenkoder
New Scratcher
2 posts

Bigger map

er, ok.
St23_BD420
Scratcher
2 posts

Bigger map

*
deck26
Scratcher
1000+ posts

Bigger map

St23_BD420 wrote:

*
Please don't spam or necropost.

Powered by DjangoBB