<?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=Conversations</id>
	<title>Conversations - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Conversations"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Conversations&amp;action=history"/>
	<updated>2026-06-09T21:58:24Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Conversations&amp;diff=1654&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Conversations&amp;diff=1654&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=Conversations&amp;diff=1653&amp;oldid=prev</id>
		<title>scratch&gt;Jakel181: oops</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Conversations&amp;diff=1653&amp;oldid=prev"/>
		<updated>2019-01-08T21:15:30Z</updated>

		<summary type="html">&lt;p&gt;oops&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In [[Scratch]], two or more [[sprite]]s can talk to one another, having a dialogue &amp;#039;&amp;#039;&amp;#039;conversation&amp;#039;&amp;#039;&amp;#039;. There are several [[script]]ing methods associated with this, each unique to the other. They mainly utilize the [[Say () (block)|&amp;lt;sb&amp;gt;say []&amp;lt;/sb&amp;gt;]] block or its [[Say () for () Secs (block)|timed counterpart]] for conversing.&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
For this entire article, assume the two sprites conversing are &amp;quot;[[Scratch Cat]]&amp;quot; and &amp;quot;[[Gobo]]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Broadcast Method===&lt;br /&gt;
The [[broadcast]] method is not always the most efficient way to make sprites communicate many messages, but short conversations can be easily made using broadcasts and no [[variable]]s or [[list]]s. The following script would go into &amp;quot;Scratch Cat&amp;quot;.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
say [Hi!] for (2) secs&lt;br /&gt;
broadcast [Gobo 1 v]&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
Then, inside the Gobo sprite:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when I receive [Gobo 1 v]&lt;br /&gt;
say [How are you?] for (2) secs&lt;br /&gt;
broadcast [Scratch Cat 2 v]&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
The two sprites continuously broadcast back and forth to each other to say a message. However, when the conversation becomes long, multiple broadcasts are needed and the scripts can become unorganized.&lt;br /&gt;
&lt;br /&gt;
====Broadcast and Wait method====&lt;br /&gt;
This method is slightly more efficient, because only one script is needed in the first sprite to talk.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked //in the first sprite&lt;br /&gt;
say [Hello!] for (2) secs&lt;br /&gt;
broadcast [Gobo 1 v] and wait&lt;br /&gt;
say [How are you today?] for (2.5) secs&lt;br /&gt;
broadcast [Gobo 2 v] and wait //and so on&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
Then, inside of Gobo:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when I receive [Gobo 1 v]&lt;br /&gt;
say [Hi there!] for (2) secs&lt;br /&gt;
&lt;br /&gt;
when I receive [Gobo 2 v]&lt;br /&gt;
say [Very fine indeed! And you?] for (3) secs&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variable Method===&lt;br /&gt;
The variable method uses a variable to trigger the other sprite to talk. After a sprite finishes speaking, it changes a variable by &amp;quot;1&amp;quot;, in which the other sprite recognizes and then begins speaking. The following script would go into &amp;quot;Scratch Cat&amp;quot;.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [talker v] to [1] //sets it so the conversation starts from the beginning and functions properly&lt;br /&gt;
say [Hi Gobo] for (2) secs&lt;br /&gt;
change [talker v] by (1) //signals Gobo to talk&lt;br /&gt;
wait until &amp;lt;(talker) = [3]&amp;gt; //wait until Gobo is done responding&lt;br /&gt;
say [I am good, how about you?] for (4) secs&lt;br /&gt;
change [talker v] by (1)&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
And for the &amp;quot;Gobo&amp;quot; sprite:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
wait until &amp;lt;(talker) = [2]&amp;gt; //wait until Scratch Cat greets&lt;br /&gt;
say [Hi Scratch Cat. How are you?] for (3) secs&lt;br /&gt;
change [talker v] by (1) //signals Scratch Cat to talk&lt;br /&gt;
wait until &amp;lt;(talker) = [4]&amp;gt;&lt;br /&gt;
say [I am great also!] for (3) secs&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
The script can keep cycling continuously. The script can become very long from a long conversation, but it does not use multiple of any broadcasts. The variable method is often best for unordered conversations, in which there are multiple sprites not speaking to one another in a patterned fashion.&lt;br /&gt;
&lt;br /&gt;
===List Method===&lt;br /&gt;
The list method uses the same amount of scripting no matter how long the conversation is. It is a great method to reduce large scripts and a [[project]]&amp;#039;s file size. The list method uses two scripts, one of &amp;quot;Scratch Cat&amp;#039;s&amp;quot; messages and one of &amp;quot;Gobo&amp;#039;s&amp;quot;. The first sprite says a message, triggers the second sprite to speak, and then the cycle continues, with a variable being changed after both have fully spoken, to signal the next message from the lists. The lists are used to simply store the text which each sprite will speak, and is ordered within. The following script goes into &amp;quot;Scratch Cat&amp;quot;&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
set [item# v] to [1] //so the first message is the first item in the list of messages&lt;br /&gt;
set [talker v] to [Scratch Cat] //to know that &amp;quot;Scratch Cat&amp;quot; speaks first&lt;br /&gt;
forever&lt;br /&gt;
say (item (item#) of [Scratch Cat messages v]) for (3) secs //says the current item from the list of messages&lt;br /&gt;
set [talker v] to [Gobo] //signal &amp;quot;Gobo&amp;quot; to speak&lt;br /&gt;
wait until &amp;lt;(talker) = [Scratch Cat]&amp;gt; //wait until it is its turn to speak&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
And for &amp;quot;Gobo&amp;quot;:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
forever&lt;br /&gt;
wait until &amp;lt;(talker) = [Gobo]&amp;gt; //wait until it is its turn to talk&lt;br /&gt;
say (item (item#) of [Gobo messages v]) for (3) secs //say the item in the list of messages&lt;br /&gt;
change [item# v] by (1) //so the next message in the lists is said by each sprite instead of the same one&lt;br /&gt;
set [talker v] to [Scratch Cat] //signals &amp;quot;Scratch Cat&amp;quot; to speak&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;br /&gt;
[[Category:Drawing and Animation Tutorials‎]]&lt;br /&gt;
[[Category:Game Design Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;Jakel181</name></author>
	</entry>
</feed>