<?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=Counting_Sprites</id>
	<title>Counting Sprites - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Counting_Sprites"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Counting_Sprites&amp;action=history"/>
	<updated>2026-05-07T11:32:21Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Counting_Sprites&amp;diff=2788&amp;oldid=prev</id>
		<title>Patarakin в 13:21, 6 сентября 2022</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Counting_Sprites&amp;diff=2788&amp;oldid=prev"/>
		<updated>2022-09-06T13:21:37Z</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;Версия от 16:21, 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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{April Fools}}&lt;/del&gt;If you have a lot of [[clone]]s with a local variable, they may want to count them automatically, rather than individually assigning each of them a number in a [[set () to ()]] [[Blocks|block]]. With this method, a [[script]] could specifically call the number-seven clone without hard-coding it.&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;If you have a lot of [[clone]]s with a local variable, they may want to count them automatically, rather than individually assigning each of them a number in a [[set () to ()]] [[Blocks|block]]. With this method, a [[script]] could specifically call the number-seven clone without hard-coding it.&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;== Method ==&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;== Method ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key digida:diff:1.41:old-1832:rev-2788:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Counting_Sprites&amp;diff=1832&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Counting_Sprites&amp;diff=1832&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;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=Counting_Sprites&amp;diff=1831&amp;oldid=prev</id>
		<title>scratch&gt;Jvvg в 21:33, 6 июня 2022</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Counting_Sprites&amp;diff=1831&amp;oldid=prev"/>
		<updated>2022-06-06T21:33:30Z</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;{{April Fools}}If you have a lot of [[clone]]s with a local variable, they may want to count them automatically, rather than individually assigning each of them a number in a [[set () to ()]] [[Blocks|block]]. With this method, a [[script]] could specifically call the number-seven clone without hard-coding it.&lt;br /&gt;
&lt;br /&gt;
== Method ==&lt;br /&gt;
Firstly, a [[Variable#Global Variables|global variable]] &amp;lt;sb&amp;gt;(sprite count)&amp;lt;/sb&amp;gt; should be created. Then, on the stage, the following script should be added:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [sprite count v] to [0]&lt;br /&gt;
broadcast (count sprites v) and wait&lt;br /&gt;
. . .&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, for all the sprites that want to be counted (and generally these will be clones of the same sprite), this script should be added:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when I receive [count sprites v]&lt;br /&gt;
change [sprite count v] by (1) // This takes advantage of the fact that scripts are not run at the same time.&lt;br /&gt;
set [my number v] to (sprite count) // Swap these two blocks to start count at 0 instead of 1&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, when the [[Flag (programming feature)|flag]] is clicked, each sprite will obtain a unique number in &amp;lt;sb&amp;gt;(my number)&amp;lt;/sb&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This works because of the [[Broadcast#Execution Order|execution order of broadcasts]].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Sprite]]&lt;br /&gt;
* [[Cloning]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;Jvvg</name></author>
	</entry>
</feed>