I was reading around on the forum, trying to find someone that had a standard split screen code and a guy mentioned dungeon defenders. he said to look at the split screen code in the game viewport. so I downloaded the files and looked in the viewport. I seen some code with split screen in it, but I don't know which part i'm suppose to use for my game
here's the pieces of code I found with split screen in it...
/** Static array of all of our cursor particles, up to a max num */
var CursorParticle CursorParticles[NUM_CURSOR_PARTICLES];
/** The Material that our cursor particles will use */
var Material CursorParticleMat;
/** The most recent canvas width */
var int LastCanvasWidth;
/** The most recent canvas height */
var int LastCanvasHeight;
/** Whether the game will currently allow split-screen (may be toggled off, for example, during a full-screen cinematic) */
var bool WantSplitScreen;
var float LastResetCursorParticleTime;
/** Updates the split-screen mode, forcing split-screen to be disabled when we don't want it (i.e. during a cinematic) */
function UpdateActiveSplitscreenType()
{
if(!WantSplitScreen)
{
ActiveSplitscreenType = eSST_NONE;
return;
}
super.UpdateActiveSplitscreenType();
}
/** Sets whether we currently want split-screen support, and updates accordingly for the new value to take effect */
function DunDefSetSplitScreen(bool splitScreen)
{
WantSplitScreen = splitScreen && main(GetCurrentWorldInfo().Game).IsGameplayLevel();
UpdateActiveSplitscreenType();
}
event bool Init(out string OutError)
{
local bool returnVal;
local PlayerManagerInteraction PlayerInteraction;
ActiveSplitscreenType = DesiredSplitscreenType;
DefaultProperties
{
UIControllerClass=class'UDKGame.DunDefUIController'
WantSplitScreen=true
LastCanvasWidth=1024
LastCanvasHeight=768
CursorParticleMat=Material'DunDefMisc.CursorParticle'
bUseConsole=true
}