The Infamous Message


Want to make a message pop up that proudly displays your website's URL when the player enters your level? Then get ready, cause here comes a message.

We'll need a test environment for this one, again. Since I'm a lazy bastard, we can re-use Tutbas1.wad in this example, except we won't do anything with the switch this time.

Good news for those who dislike level editing: no need to even load an editor! Making a start-up message is as simple as scripting, then importing it into SMMU.

Even though it's not triggered by a linedef, we still need to give our script a unique number and set it off with [scripts].

[scripts]

script 99

{
}

Be forewarned, now that there is a script 99, any linedefs with tag #99 will trigger this script. For our script, we can use the 'tip' and 'wait' functions to display a message, wait a given number of clocks, and then display another message. For the wait function, we'll use 105 clocks, which is equivilent to a bit more than a second. (Sorry for my earlier mistake that FS uses "tics".)

[scripts]

script 99

{

tip("SMMU Tutorials Page");
wait(105);
tip("http://smmu.frad.org/");

}


Now that that's all done, how do we start it automagically when the level loads? With the startscript function.

[scripts]

script 99

{

tip("SMMU Tutorials Page");
wait(105);
tip("http://smmu.frad.org/");

}

startscript(99);


Whee! Our script is done. Now insert the script into your level (see Basic Script Implementation: Part Deux for details) and load it up. If all goes well, you should see the SMMU Tutorials Page being plugged as soon as you load the level.