<?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=Stop_Detection</id>
	<title>Stop Detection - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Stop_Detection"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Stop_Detection&amp;action=history"/>
	<updated>2026-05-03T01:00:45Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Stop_Detection&amp;diff=1840&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Stop_Detection&amp;diff=1840&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-1839:rev-1840 --&gt;
&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Stop_Detection&amp;diff=1839&amp;oldid=prev</id>
		<title>scratch&gt;Jvvg в 21:38, 6 июня 2022</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Stop_Detection&amp;diff=1839&amp;oldid=prev"/>
		<updated>2022-06-06T21:38:49Z</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;In some cases, it can be useful to have an action occur after the [[Stop Sign]] is pressed. Examples include giving a user a goodbye message, thumbnail fade-in effects, or logging off of a [[Cloud Data|cloud]] project.&lt;br /&gt;
&lt;br /&gt;
== Scripts ==&lt;br /&gt;
&lt;br /&gt;
{{warning|The following scripts will make your project run continuously until you close the editor, player, or browser tab.}}&lt;br /&gt;
&lt;br /&gt;
The following [[scripts]] will be able to run a script after the stop sign is pressed.&lt;br /&gt;
&lt;br /&gt;
=== Method 1 ===&lt;br /&gt;
&lt;br /&gt;
{{note|The following script given &amp;#039;&amp;#039;&amp;#039;can&amp;#039;&amp;#039;&amp;#039; be used if the [[Timer (block)|timer]] is already used for other purposes, since this uses a [[variable]] to set the [[Timer (value)|timer]].}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
forever&lt;br /&gt;
set [stop detector v] to ((timer)+(0.1))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
when [timer v] &amp;gt; (stop detector)&lt;br /&gt;
if &amp;lt;(timer) &amp;gt; (stop detector)&amp;gt; then // Due to the beginning value of stop detector being 0, this is needed.&lt;br /&gt;
...&lt;br /&gt;
end&lt;br /&gt;
stop [this script v]&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first script constantly keeps the stop detector variable slightly greater than the timer. When the project is stopped, the script no longer works, so the timer becomes greater than the stop detector. This then runs the second script.&lt;br /&gt;
&lt;br /&gt;
=== Method 2 ===&lt;br /&gt;
{{caution|The following script given cannot be used if the [[Timer (value)|timer]] is already used for other purposes since this could break the project, as it constantly resets the timer.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
forever&lt;br /&gt;
reset timer&lt;br /&gt;
&lt;br /&gt;
when [timer v] &amp;gt; (0.3) // The number input may be lowered for a shorter delay.&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first script keeps the timer constantly at 0. This script will end once the project is stopped, allowing the timer to continue. The second script waits for this continuation, thereby running the script.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
* [[projects:19985916]]&lt;br /&gt;
* [[projects:79396438]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Stop Sign]]&lt;br /&gt;
* [[Timer]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;br /&gt;
[[ja:停止後にスクリプトを動かす]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;Jvvg</name></author>
	</entry>
</feed>