Getting room descriptions to print when something happens

This is mainly for my light switch, but I've had a few occasions where it'd be good to know what code is necessary to get it to print the room description anew when a Thing happens.

With my light switch, I have the following room set up but though it will light things up / darken them, it won't print the description unless I type Look. I tried searching in the forums, but I didn't get anything extra from it. Please help!

   <inherit name="editor_room" />
   <usedefaultprefix />
   <prefix>to the</prefix>
   <description>The morgue has the typical wall of refridgerated drawers at one end.  A computer desk sits in one corner, counters and cupboards at the other end.  An operating table with portable light attached, set of scales and a wheeled tray of instruments sits in the middle of the room, over a pair of drains.  The morgue drawers are numbered 1 - 12.  There are a stack of gurneys to your right next to a pile of zip-lock black bags folded in half.</description>
   <dark />
   <darkroomdescription>The room is too dark to make anything out.</darkroomdescription>
   <exit alias="southwest" to="Medical Bay">
     <inherit name="southwestdirection" />
     <lightsource />
     <lightstrength>weak</lightstrength>
   </exit>
   <object name="lightswitch">
     <inherit name="editor_object" />
     <inherit name="switchable" />
     <feature_switchable />
     <onswitchon type="script">
       Morgue.dark = False
     </onswitchon>
     <onswitchoff type="script">
       Morgue.dark = True
     </onswitchoff>
     <feature_lightdark />
     <lightsource />
     <lightstrength>weak</lightstrength>
     <alt type="stringlist">
       <value>light</value>
       <value>switch</value>
     </alt>
     <feature_usegive />
     <use type="script">
       if (IsSwitchedOn(lightswitch)) {
         SwitchOff (lightswitch)
       }
       else if (not IsSwitchedOn(lightswitch)) {
         SwitchOn (lightswitch)
       }
       else {
       }
     </use>
     <displayverbs type="stringlist">
       <value>Look at</value>
       <value>Switch on</value>
       <value>Switch off</value>
     </displayverbs>
     <look type="string"></look>
     <scenery />
   </object>
   <object name="player">
     <inherit name="editor_object" />
     <statusattributes type="stringdictionary" />
     <counter type="int">0</counter>
     <attr name="feature_wearable" type="boolean">false</attr>
     <money type="int">10</money>
     <attr name="new name">no one</attr>
     <changedname type="script">
     </changedname>
   </object>
 </object>

You can call the function ShowRoomDescription () after using the switch


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums