<?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=Timing_change_for_death_handler_script_%28Dying.sc%29</id>
	<title>Timing change for death handler script (Dying.sc) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://sciwiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Timing_change_for_death_handler_script_%28Dying.sc%29"/>
	<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Timing_change_for_death_handler_script_(Dying.sc)&amp;action=history"/>
	<updated>2026-09-19T07:00:02Z</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=Timing_change_for_death_handler_script_(Dying.sc)&amp;diff=7010&amp;oldid=prev</id>
		<title>Jeremiah Nellis at 02:44, 2 November 2013</title>
		<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Timing_change_for_death_handler_script_(Dying.sc)&amp;diff=7010&amp;oldid=prev"/>
		<updated>2013-11-02T02:44:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:44, 2 November 2013&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-l42&quot; &gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;If you need more granularity than seconds, it would be simple to expose the &amp;#039;cycles&amp;#039; property instead of the &amp;#039;seconds&amp;#039; property in the Script class, then change the dying script to use cycles instead of seconds.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;If you need more granularity than seconds, it would be simple to expose the &amp;#039;cycles&amp;#039; property instead of the &amp;#039;seconds&amp;#039; property in the Script class, then change the dying script to use cycles instead of seconds.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;[[Category:Examples]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key collectr_mwSCI-mw_:diff::1.12:old-7009:rev-7010 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jeremiah Nellis</name></author>
	</entry>
	<entry>
		<id>http://sciwiki.sierrahelp.com/index.php?title=Timing_change_for_death_handler_script_(Dying.sc)&amp;diff=7009&amp;oldid=prev</id>
		<title>Jeremiah Nellis: Created page with &quot;&#039;&#039;Originally posted on the SCI Programming Forums by Gumby.&#039;&#039;    I just utilized the dying.sc script for the first time and I immediately noticed ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://sciwiki.sierrahelp.com/index.php?title=Timing_change_for_death_handler_script_(Dying.sc)&amp;diff=7009&amp;oldid=prev"/>
		<updated>2013-11-02T02:41:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;Originally posted on the &lt;a href=&quot;https://sciprogramming.com/community/index.php?topic,665.html&quot; class=&quot;extiw&quot; title=&quot;scipf:topic,665.html&quot;&gt;SCI Programming Forums&lt;/a&gt; by &lt;a href=&quot;/index.php/Gumby&quot; class=&quot;mw-redirect&quot; title=&quot;Gumby&quot;&gt;Gumby&lt;/a&gt;.&amp;#039;&amp;#039;    I just utilized the dying.sc script for the first time and I immediately noticed ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;Originally posted on the [[scipf:topic,665.html|SCI Programming Forums]] by [[Gumby]].&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I just utilized the dying.sc script for the first time and I immediately noticed that there is a significant delay between calling the the script and the death &amp;#039;screen&amp;#039; popping up.&lt;br /&gt;
&lt;br /&gt;
This is by design, but I didn&amp;#039;t like the fact that the delay length was hard-coded into script.  Making a few modifications, I exposed the delay property for the script:&lt;br /&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;&amp;gt;&lt;br /&gt;
(instance public DyingScript of Script&lt;br /&gt;
	(properties&lt;br /&gt;
	    seconds 3	     //  Exposed this property (just by adding it here), &lt;br /&gt;
        )                    //  which is inherited from the Script class &amp;amp; set the default to 3&lt;br /&gt;
	&lt;br /&gt;
	(method (changeState newState)&lt;br /&gt;
		(var mbResult, message)&lt;br /&gt;
		= state newState&lt;br /&gt;
		(if(== state 0)&lt;br /&gt;
			ProgramControl()&lt;br /&gt;
			(send gTheMusic:fade())&lt;br /&gt;
			(send gRoom:setScript(0))&lt;br /&gt;
			Load(rsSOUND 2)&lt;br /&gt;
			//= seconds 3     // Commented out this line, which set the delay to 3 seconds&lt;br /&gt;
		)(else&lt;br /&gt;
  			(if(== state 1)&lt;br /&gt;
                ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
So now, when I call the dying script, I can specify seconds like so:&lt;br /&gt;
&lt;br /&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;&amp;gt;&lt;br /&gt;
  (send dyingScript:&lt;br /&gt;
       caller(802)&lt;br /&gt;
       seconds(1)   //  You can set this to however long you wish, based on your animation length&lt;br /&gt;
       register(&amp;quot;You are dead.&amp;quot;)&lt;br /&gt;
   )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&lt;br /&gt;
If you need more granularity than seconds, it would be simple to expose the &amp;#039;cycles&amp;#039; property instead of the &amp;#039;seconds&amp;#039; property in the Script class, then change the dying script to use cycles instead of seconds.&lt;/div&gt;</summary>
		<author><name>Jeremiah Nellis</name></author>
	</entry>
</feed>