Scrolling End Credits

Put this code in your custom player class (click here to download this fragment):

// ----------------------------------------------------------------------
// ShowCredits()
// This is stuff for setting up custom end credits
// ----------------------------------------------------------------------

function ShowCredits(optional bool bLoadIntro)
    local DeusExRootWindow root;
    local MyCreditsWindow winCredits;

    root = DeusExRootWindow(rootWindow);

    if (root != None)
        // Show the credits screen and force the game not to pause
        // if we're showing the credits after the endgame
        winCredits = MyCreditsWindow(root.InvokeMenuScreen(Class'MyCreditsWindow', bLoadIntro));


Put this code in a file called MyCreditsWindow.uc:

// MyCreditsWindow
class MyCreditsWindow extends CreditsWindow;

var string textPackage;

// ----------------------------------------------------------------------
// ProcessText()
// ----------------------------------------------------------------------

function ProcessText()
    local DeusExTextParser parser;

    PrintPicture(CreditsBannerTextures, 2, 1, 505, 75);

    // First check to see if we have a name
    if (textName != '')
        // Create the text parser
        parser = new(None) Class'DeusExTextParser';

        // Attempt to find the text object
        if (parser.OpenText(textName,textPackage))






You can set the CreditsBannerTextures values to a 2-image custom logo, the TeamPhotoTextures to a 3-image picture, the ScrollMusicString to specific what music to play, and the textPackage to the name of the package you will be building the credits text into.

To set up the credits, use a text file called MyCredits.txt (or whatever you want to put as the textName value) and build it into your package.  Follow the same procedure that you would use to build text for your own DataCubes, e-mail, etc, as described in How to add a personal computer.

To use this, do the following in the final mission script for your levels at the point where you want the credits to roll, where MyCustomPlayer is the name of your player class:

local MyCustomPlayer MyPlayer;
MyPlayer = MyCustomPlayer(GetPlayerPawn());

Back to main page