<?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=How_to_Make_a_Toggle</id>
	<title>How to Make a Toggle - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=How_to_Make_a_Toggle"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Toggle&amp;action=history"/>
	<updated>2026-05-08T21:04:48Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Make_a_Toggle&amp;diff=1836&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Toggle&amp;diff=1836&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:17Z</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;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&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;4&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;!-- diff cache key digida:diff:1.41:old-1835:rev-1836 --&gt;
&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Make_a_Toggle&amp;diff=1835&amp;oldid=prev</id>
		<title>scratch&gt;Jvvg в 21:34, 6 июня 2022</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Make_a_Toggle&amp;diff=1835&amp;oldid=prev"/>
		<updated>2022-06-06T21:34:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{expand|date=August 2021}}&lt;br /&gt;
Toggles are used to turn sound off and on, control a [[Sprite]], and more. This tutorial will list two methods on &amp;#039;&amp;#039;&amp;#039;how to make a toggle&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Method 1 ==&lt;br /&gt;
This method uses the [[When This Sprite Clicked (block)|when this sprite clicked]] [[Hat Block|hat block]] to sense if the sprite is clicked. This one needs two [[Costume]]s, both of an on and off switch.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
set [toggle v] to [off]&lt;br /&gt;
&lt;br /&gt;
when this sprite clicked&lt;br /&gt;
if &amp;lt;(toggle) = [off]&amp;gt; then&lt;br /&gt;
set [toggle v] to [on]&lt;br /&gt;
switch costume to [on v]&lt;br /&gt;
else&lt;br /&gt;
set [toggle v] to [off]&lt;br /&gt;
switch costume to [off v]&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Method 2 ==&lt;br /&gt;
The same effect can be achieved with this script, using numerical values and logical operations to toggle between 0 (being off) and 1 (being on):&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [toggle v] to [0]&lt;br /&gt;
when [space v] key pressed&lt;br /&gt;
set [toggle v] to &amp;lt;(toggle) = [0]&amp;gt;&lt;br /&gt;
if &amp;lt;(toggle) = [1]&amp;gt; then&lt;br /&gt;
. . . // toggle is on&lt;br /&gt;
else&lt;br /&gt;
. . . // toggle is off&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials|Toggle]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;Jvvg</name></author>
	</entry>
</feed>