<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://sciwiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Global_Said%28%29_Statements</id>
	<title>Global Said() Statements - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://sciwiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Global_Said%28%29_Statements"/>
	<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Global_Said()_Statements&amp;action=history"/>
	<updated>2026-08-27T21:17:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://sciwiki.sierrahelp.com/index.php?title=Global_Said()_Statements&amp;diff=455&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Global_Said()_Statements&amp;diff=455&amp;oldid=prev"/>
		<updated>2013-08-05T22:53:27Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:53, 5 August 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://sciwiki.sierrahelp.com/index.php?title=Global_Said()_Statements&amp;diff=454&amp;oldid=prev</id>
		<title>Andrew Branscom: /* Examples of Using The Global Said Statements */</title>
		<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Global_Said()_Statements&amp;diff=454&amp;oldid=prev"/>
		<updated>2011-01-06T05:12:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Examples of Using The Global Said Statements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== About Global Said Statements ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Script-Said.png|Script]]Global said statements are essential to all good adventure games. They add a greater feel of freedom to explore and interact with the game&amp;#039;s environment. Every SCI game needs to be able to react to certain phrases in every room, and there&amp;#039;s no reason to repeat code if it&amp;#039;s unnecessary.&lt;br /&gt;
&lt;br /&gt;
Sierra&amp;#039;s games all had global phrases, many to add humor to the game. For example, if you type &amp;quot;Hello&amp;quot;, the game will respond &amp;quot;Hi.&amp;quot; back, or if you type &amp;quot;jump&amp;quot;, it will respond &amp;quot;Whee!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Adding Global Said Statements To The Game ==&lt;br /&gt;
&lt;br /&gt;
Global said statements are no harder to add to your game than any other said statements. Instead of adding them to the room script&amp;#039;s handleEvent method, simply add them to the game instance&amp;#039;s handleEvent method found in the main script.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script-Main.png|Main Script]]First, open up your game&amp;#039;s &amp;quot;main.sc&amp;quot; script.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script-GameInstance.png|Game Instance]]Scroll down to the game&amp;#039;s instance.&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| width=&amp;quot;170&amp;quot; | [[Image:Script-HandleEvent.png|Handle Event]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | Next, scroll down to the handleEvent method (at the bottom of the instance).&lt;br /&gt;
&lt;br /&gt;
The area in the red box is where you add the global said statements.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can add the said statements like you do in any other area of the game. As long at they are in the game instance&amp;#039;s handleEvent method, they will be parsed by every room automatically.&lt;br /&gt;
&lt;br /&gt;
== Examples of Using The Global Said Statements ==&lt;br /&gt;
&lt;br /&gt;
The best thing about global said statements is that you can override them in your room, In other words, the rooms script handles the statement if it can, it&amp;#039;s only when it can&amp;#039;t that the main scripts global said statements even try. They are only parsed if the the player did not enter a phrase handled by the room. I&amp;#039;ll explain this with a global &amp;quot;look&amp;quot; said statement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot; class=&amp;quot;cs&amp;quot;&amp;gt;(if(Said(&amp;#039;look\)&lt;br /&gt;
  Print(&amp;quot;You see nothing special.&amp;quot;)&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, if the room doesn&amp;#039;t have a said handler for the phrase &amp;quot;look&amp;quot;, it will display the message &amp;quot;You see nothing special.&amp;quot;. However, if the room does have a said handler for &amp;quot;look&amp;quot;, it will execute the room&amp;#039;s handler. It&amp;#039;s a perfect example of how global said statements will not interfere with your rooms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can do much more with global said statements though. Here&amp;#039;s another example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sci&amp;quot; class=&amp;quot;cs&amp;quot;&amp;gt;(if(Said(&amp;#039;change/clothes&amp;#039;))&lt;br /&gt;
  SetUpEgo(2 1)&lt;br /&gt;
  Print(&amp;quot;You are now view.001 with loop 2 active!&amp;quot;)&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, if you type &amp;quot;change clothes&amp;quot;, it will set the ego to view.001 and change it&amp;#039;s loop to 2.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That sums up global said statements.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;float: left&amp;quot;&amp;gt;[[SCI_Studio_Tutorial_2|&amp;amp;lt; Previous: SCI Studio Tutorial 2]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;float: right&amp;quot;&amp;gt;[[WordFail,_syntaxFail_and_pragmaFail|Next: Chapter 2 - Oh, yeah? Well, &amp;quot;%s&amp;quot; this! &amp;amp;gt;]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:Said() Strings]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
</feed>