<?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=Using_Clones_for_Particle_Effects</id>
	<title>Using Clones for Particle Effects - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Using_Clones_for_Particle_Effects"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;action=history"/>
	<updated>2026-05-05T10:18:42Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;diff=28246&amp;oldid=prev</id>
		<title>Patarakin: /* Creating the Effect */</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;diff=28246&amp;oldid=prev"/>
		<updated>2025-03-07T10:01:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Creating the Effect&lt;/span&gt;&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;Версия от 13:01, 7 марта 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Строка 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, create two local [[variable]]s and call then velocity x and velocity y. Make sure that they&amp;#039;re &amp;quot;for this sprite only&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To begin, create two local [[variable]]s and call then velocity x and velocity y. Make sure that they&amp;#039;re &amp;quot;for this sprite only&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{note|&lt;/del&gt;Always use local variables where you can so that you do not add too many new variables to the user&#039;s palette. If the user has variables of the same name, there will be errors. If you do need a global variable, prefix its name. For example, use &quot;(spark).color&quot; instead of &quot;color&quot;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;Always use local variables where you can so that you do not add too many new variables to the user&#039;s palette. If the user has variables of the same name, there will be errors. If you do need a global variable, prefix its name. For example, use &quot;(spark).color&quot; instead of &quot;color&quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now you will need to write the common velocity-arc script under a &amp;quot;when I start as a clone&amp;quot; block:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now you will need to write the common velocity-arc script under a &amp;quot;when I start as a clone&amp;quot; block:&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=Using_Clones_for_Particle_Effects&amp;diff=2772&amp;oldid=prev</id>
		<title>Patarakin: /* Creating the Effect */</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;diff=2772&amp;oldid=prev"/>
		<updated>2022-09-06T06:17:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Creating the Effect&lt;/span&gt;&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;Версия от 09:17, 6 сентября 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Строка 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Instructions ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Instructions ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Creating the Effect ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Creating the Effect ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, you need to create the parent sprite. This sprite will generate all the particles of the spark effect&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{-}} &lt;/del&gt;not that it itself will never be one of the particles. The general plan of the code is:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, you need to create the parent sprite. This sprite will generate all the particles of the spark effect not that it itself will never be one of the particles. The general plan of the code is:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To generate a spark effect, go to the required position&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* To generate a spark effect, go to the required position&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Create 10 clones, each of which is a particle of the spark&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Create 10 clones, each of which is a particle of the spark&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=Using_Clones_for_Particle_Effects&amp;diff=2771&amp;oldid=prev</id>
		<title>Patarakin в 06:16, 6 сентября 2022</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;diff=2771&amp;oldid=prev"/>
		<updated>2022-09-06T06:16:57Z</updated>

		<summary type="html">&lt;p&gt;&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;Версия от 09:16, 6 сентября 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Строка 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Возрастная категория=10&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Возрастная категория=10&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|similar_concepts=Flocking, Клон&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|similar_concepts=Flocking, Клон&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Environment=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Scrath, &lt;/del&gt;Snap!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Environment=Snap!&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, Scratch&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;[[Клон]]ы&amp;#039;&amp;#039;&amp;#039; появились в Scratch с версии 2. They allowed you to create complete duplicates of [[sprite]]s, which can then individually run tasks.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;[[Клон]]ы&amp;#039;&amp;#039;&amp;#039; появились в Scratch с версии 2. They allowed you to create complete duplicates of [[sprite]]s, which can then individually run tasks.&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=Using_Clones_for_Particle_Effects&amp;diff=2770&amp;oldid=prev</id>
		<title>Patarakin в 06:16, 6 сентября 2022</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;diff=2770&amp;oldid=prev"/>
		<updated>2022-09-06T06:16:22Z</updated>

		<summary type="html">&lt;p&gt;&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;Версия от 09:16, 6 сентября 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Clone&lt;/del&gt;]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s&lt;/del&gt;&#039;&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;were a new feature in [[&lt;/del&gt;Scratch 2&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.0]]&lt;/del&gt;. They allowed you to create complete duplicates of [[sprite]]s, which can then individually run tasks.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Scripting Tutorials&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|Description=Как создать эффект частиц с помощью клонов?&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|Field_of_knowledge=Химия, Биология, Информатика&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|FieldActivity=Computational Thinker&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|Возрастная категория=10&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|similar_concepts=Flocking, Клон&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|Environment=Scrath, Snap!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Клон&lt;/ins&gt;]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ы&lt;/ins&gt;&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;появились в &lt;/ins&gt;Scratch &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;с версии &lt;/ins&gt;2. They allowed you to create complete duplicates of [[sprite]]s, which can then individually run tasks.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using clones properly is important {{-}} you should make sure your scripts are concise, fast, and readable. This tutorial will explain how to use clones to create a utility for particle effects. This will begin with using clones to create a &amp;#039;spark&amp;#039; effect, then optimize the code, and finally create an easy-to-use package for a user so that they can incorporate it into a [[project]] easily. The goal is to create a single block called &amp;quot;Create a spark at x: () y: ()&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Using clones properly is important {{-}} you should make sure your scripts are concise, fast, and readable. This tutorial will explain how to use clones to create a utility for particle effects. This will begin with using clones to create a &amp;#039;spark&amp;#039; effect, then optimize the code, and finally create an easy-to-use package for a user so that they can incorporate it into a [[project]] easily. The goal is to create a single block called &amp;quot;Create a spark at x: () y: ()&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot;&gt;Строка 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now you will need to write the common velocity-arc script under a &amp;quot;when I start as a clone&amp;quot; block:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now you will need to write the common velocity-arc script under a &amp;quot;when I start as a clone&amp;quot; block:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!-- [[File:Spark_scr_1.png]] --&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;scratchblocks&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;scratchblocks&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When [space v] key pressed&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;When [space v] key pressed&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l82&quot;&gt;Строка 82:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 89:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, we hide the parent spark, because it should not be visible. We also make the spark creation routine a custom block. Then we add a small delay when creating a clone, which changes over time to give a more realistic effect:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First, we hide the parent spark, because it should not be visible. We also make the spark creation routine a custom block. Then we add a small delay when creating a clone, which changes over time to give a more realistic effect:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!-- [[File:Spark_scr_3.png]] --&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;scratchblocks&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;scratchblocks&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;when gf clicked&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;when gf clicked&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l272&quot;&gt;Строка 272:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 279:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scripting Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scripting Tutorials]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Computer Science]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Cloning]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[ja:クローンを使ったパーティクル効果]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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=Using_Clones_for_Particle_Effects&amp;diff=1646&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;diff=1646&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=Using_Clones_for_Particle_Effects&amp;diff=1645&amp;oldid=prev</id>
		<title>scratch&gt;TemplatesFTW: Automated edit: fixed 1 style guideline</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Using_Clones_for_Particle_Effects&amp;diff=1645&amp;oldid=prev"/>
		<updated>2021-12-30T00:33:24Z</updated>

		<summary type="html">&lt;p&gt;Automated edit: fixed 1 style guideline&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;[[Clone]]s&amp;#039;&amp;#039;&amp;#039; were a new feature in [[Scratch 2.0]]. They allowed you to create complete duplicates of [[sprite]]s, which can then individually run tasks.&lt;br /&gt;
&lt;br /&gt;
Using clones properly is important {{-}} you should make sure your scripts are concise, fast, and readable. This tutorial will explain how to use clones to create a utility for particle effects. This will begin with using clones to create a &amp;#039;spark&amp;#039; effect, then optimize the code, and finally create an easy-to-use package for a user so that they can incorporate it into a [[project]] easily. The goal is to create a single block called &amp;quot;Create a spark at x: () y: ()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
=== Creating the Effect ===&lt;br /&gt;
First, you need to create the parent sprite. This sprite will generate all the particles of the spark effect{{-}} not that it itself will never be one of the particles. The general plan of the code is:&lt;br /&gt;
* To generate a spark effect, go to the required position&lt;br /&gt;
* Create 10 clones, each of which is a particle of the spark&lt;br /&gt;
* When the particles are created, they fly out and fall, together giving the effect of a spark&lt;br /&gt;
First, create your sprite. Name it &amp;quot;Spark&amp;quot; and make its costume a single orange dot.&lt;br /&gt;
{{note|The reason why a costume is used instead of the pen to draw is because if the user&amp;#039;s script calls &amp;quot;clear&amp;quot;, the particle effect will be erased.}}&lt;br /&gt;
&lt;br /&gt;
To begin, create two local [[variable]]s and call then velocity x and velocity y. Make sure that they&amp;#039;re &amp;quot;for this sprite only&amp;quot;.&lt;br /&gt;
{{note|Always use local variables where you can so that you do not add too many new variables to the user&amp;#039;s palette. If the user has variables of the same name, there will be errors. If you do need a global variable, prefix its name. For example, use &amp;quot;(spark).color&amp;quot; instead of &amp;quot;color&amp;quot;.}}&lt;br /&gt;
&lt;br /&gt;
Now you will need to write the common velocity-arc script under a &amp;quot;when I start as a clone&amp;quot; block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[File:Spark_scr_1.png]] --&amp;gt;&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
When [space v] key pressed&lt;br /&gt;
repeat (10)&lt;br /&gt;
  create clone of [myself v]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
When I start as a clone&lt;br /&gt;
set [velocity x v] to ((pick random (-5) to (5)) / (3))&lt;br /&gt;
set [velocity y v] to (pick random (1) to (10))&lt;br /&gt;
repeat (20)&lt;br /&gt;
  change x by (velocity x)&lt;br /&gt;
  change y by (velocity y)&lt;br /&gt;
  change [velocity y v] by (-1)&lt;br /&gt;
end&lt;br /&gt;
delete this clone&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, you can run the script! Just press space to see some sparks.&lt;br /&gt;
&lt;br /&gt;
How come the velocity variables do not get muddled with each other and get reset by each clone? When we clicked &amp;quot;for this sprite only&amp;quot;, we made it a lexically scoped variable which is duplicated along with the sprite. That is, each clone had its own velocity x and velocity y variables independent of each other.&lt;br /&gt;
&lt;br /&gt;
One of the issues with this script is that if you press space multiple times, each spark duplicates itself. This is clearly wrong behavior; it happens because when space is pressed, each clone starts creating copies. So we need a new variable which tells us whether we are a clone or not:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [is clone? v] to [no]&lt;br /&gt;
&lt;br /&gt;
when [space v] key pressed&lt;br /&gt;
if &amp;lt;(is clone?) = [no]&amp;gt; then&lt;br /&gt;
  repeat (10)&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
when I start as a clone&lt;br /&gt;
set [is clone? v] to [yes]&lt;br /&gt;
set [velocity x v] to ((pick random (-5) to (5)) / (3))&lt;br /&gt;
set [velocity y v] to (pick random (1) to (10))&lt;br /&gt;
repeat (20)&lt;br /&gt;
  change x by (velocity x)&lt;br /&gt;
  change y by (velocity y)&lt;br /&gt;
  change [velocity y v] by (-1)&lt;br /&gt;
end&lt;br /&gt;
delete this clone&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The is clone? variable tells the sprite whether or not to duplicate itself. Make sure this is local, too. You can also fix the issue by instead of using when space key pressed you could use&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;when gf clicked&lt;br /&gt;
forever&lt;br /&gt;
 if &amp;lt;key [space v] pressed&amp;gt; then&lt;br /&gt;
  repeat (10)&lt;br /&gt;
   create clone of [myself v]&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;
=== Optimizations and Improvements ===&lt;br /&gt;
In this section, we will add the following optimizations to the spark engine:&lt;br /&gt;
* Sparks will be created gradually, instead of suddenly&lt;br /&gt;
* Sparks will fade out and &amp;quot;die&amp;quot; automatically, instead of waiting to touch the edge&lt;br /&gt;
&lt;br /&gt;
First, we hide the parent spark, because it should not be visible. We also make the spark creation routine a custom block. Then we add a small delay when creating a clone, which changes over time to give a more realistic effect:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[File:Spark_scr_3.png]] --&amp;gt;&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [is clone? v] to [no]&lt;br /&gt;
hide&lt;br /&gt;
&lt;br /&gt;
when I start as a clone&lt;br /&gt;
show&lt;br /&gt;
set [is clone? v] to [yes]&lt;br /&gt;
set [velocity x v] to ((pick random (-5) to (5)) / (3))&lt;br /&gt;
set [velocity y v] to (pick random (1) to (10))&lt;br /&gt;
repeat (20)&lt;br /&gt;
  change x by (velocity x)&lt;br /&gt;
  change y by (velocity y)&lt;br /&gt;
  change [velocity y v] by (-1)&lt;br /&gt;
end&lt;br /&gt;
delete this clone&lt;br /&gt;
&lt;br /&gt;
define Create effect at (x) (y)&lt;br /&gt;
go to x: (x) y: (y)&lt;br /&gt;
set [creation_delay v] to [-0.05]&lt;br /&gt;
if &amp;lt;(is clone?) = [no]&amp;gt; then&lt;br /&gt;
  repeat (10)&lt;br /&gt;
    change [creation_delay v] by (0.001)&lt;br /&gt;
    wait ((creation_delay) * (creation_delay)) secs&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
when [space v] key pressed&lt;br /&gt;
Create effect at (1) (1)&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make sparks fade out, we simply change the ghost effect:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [is clone? v] to [no]&lt;br /&gt;
hide&lt;br /&gt;
&lt;br /&gt;
when I start as a clone&lt;br /&gt;
show&lt;br /&gt;
set [is clone? v] to [yes]&lt;br /&gt;
set [velocity x v] to ((pick random (-5) to (5)) / (3))&lt;br /&gt;
set [velocity y v] to (pick random (1) to (10))&lt;br /&gt;
repeat (20)&lt;br /&gt;
  change [ghost v] effect by (5)&lt;br /&gt;
  change x by (velocity x)&lt;br /&gt;
  change y by (velocity y)&lt;br /&gt;
  change [velocity y v] by (-1)&lt;br /&gt;
end&lt;br /&gt;
delete this clone&lt;br /&gt;
&lt;br /&gt;
define Create effect at (x) (y)&lt;br /&gt;
go to x: (x) y: (y)&lt;br /&gt;
set [creation_delay v] to [-0.03]&lt;br /&gt;
if &amp;lt;(is clone?) = [no]&amp;gt; then&lt;br /&gt;
  repeat (10)&lt;br /&gt;
    change [creation_delay v] by (0.001)&lt;br /&gt;
    wait ((creation_delay) * (creation_delay)) secs&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
when [space v] key pressed&lt;br /&gt;
Create effect at (1) (1)&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also create more sparks for a richer effect, and tweak the creation delay mildly.&lt;br /&gt;
&lt;br /&gt;
=== Distributing the Code ===&lt;br /&gt;
To distribute the sparks library, we need to create a custom block which can be defined on any sprite. When called by the user, it should send a broadcast to the spark sprite to generate a spark effect.&lt;br /&gt;
&lt;br /&gt;
We do this by creating a &amp;#039;&amp;#039;&amp;#039;global&amp;#039;&amp;#039;&amp;#039; list called &amp;quot;(spark) preferences&amp;quot; which contains a list of information about the spark library. It has, in order:&lt;br /&gt;
# X position to spawn&lt;br /&gt;
# Y position to spawn&lt;br /&gt;
# Color to spawn&lt;br /&gt;
&lt;br /&gt;
Adding these touches, we have:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when [space v] key pressed&lt;br /&gt;
create effect at (1)(1)&lt;br /&gt;
&lt;br /&gt;
define create effect at (x)(y)&lt;br /&gt;
go to x: (x) y: (y)&lt;br /&gt;
set [creation_delay v] to [-0.002]&lt;br /&gt;
if &amp;lt;(is clone?)=[no]&amp;gt; then&lt;br /&gt;
 repeat (3)&lt;br /&gt;
  change [creation_delay v] by (0.005)&lt;br /&gt;
  wait ((creation_delay)*(creation_delay)) secs&lt;br /&gt;
  create clone of [myself v]&lt;br /&gt;
  create clone of [myself v]&lt;br /&gt;
  create clone of [myself v]&lt;br /&gt;
  create clone of [myself v]&lt;br /&gt;
 end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
when I start as a clone&lt;br /&gt;
show&lt;br /&gt;
set [is clone? v] to [yes]&lt;br /&gt;
set [velocity x v] to ((pick random (-5) to (5))/(3))&lt;br /&gt;
set [velocity y v] to (pick random (1) to (10))&lt;br /&gt;
repeat (20)&lt;br /&gt;
 change [ghost v] effect by (5)&lt;br /&gt;
 change x by (velocity x)&lt;br /&gt;
 change y by (velocity y)&lt;br /&gt;
 change [velocity y v] by (-1)&lt;br /&gt;
end&lt;br /&gt;
delete this clone&lt;br /&gt;
&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [is clone? v] to [no]&lt;br /&gt;
hide&lt;br /&gt;
&lt;br /&gt;
when I receive [(spark) spawn v]&lt;br /&gt;
set [color v] effect to (item (3 v) of [(spark) preferences v])&lt;br /&gt;
create effect at (item (1 v) of [(spark) preferences v])(item (2 v) of [(spark) preferences v])&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also create the global block, and a small demo script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when [space v] key pressed&lt;br /&gt;
Spawn Spark Effect at x: (mouse x) y: (mouse y) color: (pick random (1) to (200))&lt;br /&gt;
&lt;br /&gt;
define Spawn Spark Effect at x: (x) y: (y) color: (color)&lt;br /&gt;
replace item (1 v) of [(spark) preferences v] with (x)&lt;br /&gt;
replace item (2 v) of [(spark) preferences v] with (y)&lt;br /&gt;
replace item (3 v) of [(spark) preferences v] with (color)&lt;br /&gt;
broadcast [(spark) spawn v]&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An issue here is that when you create a spark while an old one is running, the old spark effect stops. This is because of the broadcast. To avoid this, we use a trigger variable instead of a broadcast. We add a new item to our preferences list. Whenever a new spark is created, we simply set this to &amp;quot;new&amp;quot;, and our library resets it back to blank once the effect has been created:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [is clone? v] to [no]&lt;br /&gt;
hide&lt;br /&gt;
&lt;br /&gt;
when I start as a clone&lt;br /&gt;
show&lt;br /&gt;
set [is clone? v] to [yes]&lt;br /&gt;
set [velocity x v] to ((pick random (-5) to (5)) / (3))&lt;br /&gt;
set [velocity y v] to (pick random (1) to (10))&lt;br /&gt;
repeat (20)&lt;br /&gt;
  change [ghost v] effect by (5)&lt;br /&gt;
  change x by (velocity x)&lt;br /&gt;
  change y by (velocity y)&lt;br /&gt;
  change [velocity y v] by (-1)&lt;br /&gt;
end&lt;br /&gt;
delete this clone&lt;br /&gt;
&lt;br /&gt;
define Create effect at (x) (y)&lt;br /&gt;
go to x: (x) y: (y)&lt;br /&gt;
set [creation_delay v] to [-0.002]&lt;br /&gt;
if &amp;lt;(is clone?) = [no]&amp;gt; then&lt;br /&gt;
  repeat (3)&lt;br /&gt;
    change [creation_delay v] by (0.005)&lt;br /&gt;
    wait ((creation_delay) * (creation_delay)) secs&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
    create clone of [myself v]&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
when gf clicked&lt;br /&gt;
forever&lt;br /&gt;
  if &amp;lt;[new] = (item (4 v) of [(sparks) preferences v])&amp;gt; then&lt;br /&gt;
    replace item (4 v) of [(sparks) preferences v] with []&lt;br /&gt;
    set [color v] effect to (item (3 v) of [(sparks) preferences v])&lt;br /&gt;
    Create effect at (item (1 v) of [(sparks) preferences v])(item (2 v) of [(sparks) preferences v])&lt;br /&gt;
&lt;br /&gt;
when [space v] key pressed&lt;br /&gt;
Spawn Spark Effect at x: (mouse x) y: (mouse y) color: (pick random (1) to (200))&lt;br /&gt;
&lt;br /&gt;
define Spawn Spark Effect at x: (x) y: (y) color: (color)&lt;br /&gt;
replace item (1 v) of [(spark) preferences v] with (x)&lt;br /&gt;
replace item (2 v) of [(spark) preferences v] with (y)&lt;br /&gt;
replace item (3 v) of [(spark) preferences v] with (color)&lt;br /&gt;
replace item (4 v) of [(spark) preferences v] with [new]&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example project can be found [[projects:10071485|here]].&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Advanced Clone Usage]]&lt;br /&gt;
* [[Detecting Clones]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;br /&gt;
[[Category:Computer Science]]&lt;br /&gt;
[[Category:Cloning]]&lt;br /&gt;
[[ja:クローンを使ったパーティクル効果]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;TemplatesFTW</name></author>
	</entry>
</feed>