Using Pawns for Ambient Effects

     Invisible pawns are great for effects like a hissing steam pipe or a fire that can be put out or even a set of toilets that can be flushed. These are just a few of the ideas for an invisible yet interactive pawn. Some other ideas may include an electrical panel, a door and treasure chest. The possibility are left to your imagination. Below is a simple script that might be used to create an effect such as a hissing steam pipe. It uses a hiss sound that can loop and a particle effect that continuously emits particles. A more advanced script might check for distance on a timer and then play a 3D sound. With this, a particle effect that does not need continuous emission can also replace the continuous effect.

{

    Init[()
    {
        self.Visible = false;
        self.setCollide = false;
        AddParticleBone("steam","bone1");
        LoopSound("hiss");
        NewOrder("Wait");
    }]

    Wait[()
    {
        return 0;
    }]

}

Copyright © 2008 Bookshock Publications.