Since early 2002, Shee Labs has been a group of individuals working to produce free game and media downloads. With ever-fluctuate staffing, Shee Labs continues working behind the scenes on various exciting projects for a bewildering array of areas. Shee Labs ceased to exist in September 2009.
This tutorial will show you how to write a mutator that uses post processing. The code was written by Luke 'Ambershee' Parkes-Haskell for Shee Labs Mutator Week.
Posted by ambershee on Feb 28th, 2008
Basic Client Side Coding.
Today we're going to recreate a mutator I wrote for Shee Labs Mutator Week! You can read about it here: Moddb.com
It's very short, very sweet and easy to modify to suit your needs. Once more, we're going to use a mutator and the modify player function. This time, we're going to change every players post process settings, and make it very difficult to see. We're also going to make the AI react accordingly, so they don't become too hard for the player to fight against.
Right! So let's analyse what we've written.
We need post process settings to set out blindness, and we also need a LocalPlayer. LocalPlayer is the class that contains the post processing controls, and it's all client side, which allows us to affect players on their machines, and not worry about the effects elsewhere - because we don't need to.
First, we find the local player (lots of nasty casting - we get the controller of the pawn, then cast it into a player controller, then we find the player of the player controller, and cast it into a local player - hope your head doesn't hurt!). We then set bOverridePostProcessSettings to true, so we can edit the post processing. We then set our post process settings to the last post process settings the local player used - this way, we don't just create new settings and ignore the post processing in the level, we can modify it instead.
In my settings, I enabled depth of field and added extra bloom. You could also add things like motion blur if you wanted. I also used the colour controls to desaturate the scene, and make it very dark - which in combination with the depth of field blur, makes it difficult to see!
I finally set the local player's post process settings override to our custom settings.
To make the AI work correctly, we check out pawn is a UTPawn, and if so, we set it invisible to AI. This means that the AI won't notice players unless the players are shooting, bump into them, or some other event that makes them noticeable.
And that's it! Compile it and play blind!