<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Multidirectional_Scrolling</id>
	<title>Multidirectional Scrolling - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Multidirectional_Scrolling"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Multidirectional_Scrolling&amp;action=history"/>
	<updated>2026-06-17T01:00:09Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Multidirectional_Scrolling&amp;diff=1668&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Multidirectional_Scrolling&amp;diff=1668&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:13Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 11:33, 21 июля 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Multidirectional_Scrolling&amp;diff=1667&amp;oldid=prev</id>
		<title>scratch&gt;TheTrillion: Fixed blocks.</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Multidirectional_Scrolling&amp;diff=1667&amp;oldid=prev"/>
		<updated>2021-07-25T04:29:37Z</updated>

		<summary type="html">&lt;p&gt;Fixed blocks.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In ordinary [[Scrolling (sprites)|scrolling]], a sprite can move in only four directions; up (0 degrees), down (180 degrees), left (-90 degrees), and right (90 degrees). However, in &amp;#039;&amp;#039;&amp;#039;multidirectional scrolling&amp;#039;&amp;#039;&amp;#039; you can scroll in any direction intended by the degree. This is often used in birds eye scrolling games and can be very useful at times.&lt;br /&gt;
&lt;br /&gt;
==Movement Control==&lt;br /&gt;
Put this script in the sprite that you want to control the scrolling with (i.e. the race car or player). The below part of the script will control the direction you are pointing in.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when flag clicked&lt;br /&gt;
forever&lt;br /&gt;
if &amp;lt;key (left arrow v) pressed&amp;gt; then&lt;br /&gt;
turn ccw (5) degrees&lt;br /&gt;
end&lt;br /&gt;
if &amp;lt;key (left arrow v) pressed&amp;gt; then&lt;br /&gt;
turn cw (5) degrees&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
The next part of the script can be coded in two different ways. One way can be coded very simply if the sprite controlling the scrolling is a person. In this version of the code, if no keys are pressed all sprites will immediately stop scrolling. The second option to scripting this part is a bit more advanced. It can be used so that when no keys are pressed, the sprite will drift to a stop, providing a smooth, car like scrolling experience.&lt;br /&gt;
&lt;br /&gt;
===Method 1 (Easy Way)===&lt;br /&gt;
&lt;br /&gt;
Add this script inside the previously made forever loop&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
if &amp;lt;key (up arrow v) pressed&amp;gt; then&lt;br /&gt;
set [speed v] to [5]&lt;br /&gt;
end&lt;br /&gt;
if &amp;lt;key (down arrow v) pressed&amp;gt; then&lt;br /&gt;
set [speed v] to [-5]&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Method 2 (Hard Way)===&lt;br /&gt;
Add this script inside the previously made forever loop&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
if &amp;lt;key (up arrow v) pressed&amp;gt; then&lt;br /&gt;
if &amp;lt;(speed) &amp;lt; [5]&amp;gt; then//&amp;quot;5&amp;quot; is the maximum speed one can scroll at&lt;br /&gt;
change [speed v] by [0.1]&lt;br /&gt;
else&lt;br /&gt;
set [speed v] to [5]&lt;br /&gt;
end&lt;br /&gt;
else&lt;br /&gt;
if &amp;lt;key (down arrow v) pressed&amp;gt; then&lt;br /&gt;
if &amp;lt;(speed) &amp;gt; [-5]&amp;gt; then//&amp;quot;-5&amp;quot; is the maximum speed you can scroll at going backwards&lt;br /&gt;
change [speed v] by [-0.1]&lt;br /&gt;
else&lt;br /&gt;
set [speed v] to [-5]&lt;br /&gt;
end&lt;br /&gt;
else&lt;br /&gt;
if &amp;lt;not &amp;lt;(speed) = [0]&amp;gt;&amp;gt; then&lt;br /&gt;
if &amp;lt;(speed) &amp;gt; [0]&amp;gt; then&lt;br /&gt;
change [speed v] by [-0.1]&lt;br /&gt;
else&lt;br /&gt;
change [speed v] by [0.1]&lt;br /&gt;
end&lt;br /&gt;
if &amp;lt;([abs v] of (speed)) &amp;lt; [0.1]&amp;gt; then //Needed because otherwise errors in double-point precision will cause the number to stay above zero.&lt;br /&gt;
set [speed v] to [0]&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Scripting the Scrolling Movement===&lt;br /&gt;
This is the last part of the script. This is the most important part and will enable you to use your multidirectional scrolling.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
change [scroll x v] by (([sin v] of (direction)) * (speed))&lt;br /&gt;
change [scroll y v] by (([cos v] of (direction)) * (speed))&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Scrolling Sprites==&lt;br /&gt;
Next you will need to make the other sprites scroll. To do this, place the below script in all the sprites acting as the &amp;quot;background&amp;quot; and scrolling.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when flag clicked&lt;br /&gt;
forever&lt;br /&gt;
set x to ((scroll x) + ((0) * (480)))//to make the sprite farther over change 0 to 1 or even more&lt;br /&gt;
set y to ((scroll y) + ((0) * (360)))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;TheTrillion</name></author>
	</entry>
</feed>