https://creatures.wiki/BKGD?action=history&feed=atom&BKGD - Revision history2024-03-28T10:00:26ZRevision history for this page on the wikiMediaWiki 1.33.1https://creatures.wiki/index.php?title=BKGD&diff=50241&oldid=prevAllekha: Created page with "'''BKGD''' is a CAOS command and function that returns or sets the current background image for a given metaroom. ==Usage== ===Command=== Syntax: ''BKGD metaroom_ID(i..."2016-10-02T20:54:04Z<p>Created page with "'''BKGD''' is a <a href="/CAOS" title="CAOS">CAOS</a> command and function that returns or sets the current background image for a given <a href="/Metaroom" title="Metaroom">metaroom</a>. ==Usage== ===Command=== Syntax: ''BKGD metaroom_ID(i..."</p>
<p><b>New page</b></p><div>'''BKGD''' is a [[CAOS]] command and function that returns or sets the current background image for a given [[metaroom]].<br />
<br />
==Usage==<br />
===Command===<br />
Syntax: ''BKGD metaroom_ID(integer) background(string) transition(integer)''<br />
<br />
Changes the background of the given metaroom. 'Background' is the background's file name; transition is as for [[META]] - 0 for no transition effect, 1 for a horizontal flip effect, 1 for a burst effect. The background must have been specified with [[ADDB]] or [[ADDM]] first.<br />
<br />
===Function===<br />
Syntax: ''BKGD metaroom_ID(integer)''<br />
<br />
Returns the current background of the given metaroom as a string.<br />
<br />
==Example==<br />
BKGD can be used by metarooms to change backgrounds - for a day/night cycle, for example, or to have backgrounds for different seasons. This is seen in rooms like [[Terra Pluvialis]] and the [[Desert Ruins]].<br />
<br />
Example code from the [[Desert Ruins]] background switching script:<br />
<pre><br />
new: simp 3 8 50734 "blnk" 1 0 20<br />
accg 0<br />
attr 16<br />
bhvr 0<br />
mvto 22250 94072<br />
setv ov01 gmap posx posy<br />
tick 1<br />
<br />
**day/night script<br />
scrp 3 8 50734 9<br />
doif time eq 4 and bkgd ov01 eq "desert-wasteland-finished-daytime"<br />
scam null -1<br />
bkgd ov01 "desert-wasteland-finished-nighttime" 2<br />
elif time eq 0 and bkgd ov01 eq "desert-wasteland-finished-nighttime"<br />
scam null -1<br />
bkgd ov01 "desert-wasteland-finished-daytime" 2<br />
endi<br />
endm<br />
</pre><br />
<br />
==See Also==<br />
* [[BKDS]]<br />
[[Category:C3 CAOS Commands]]</div>Allekha