PDA

View Full Version : Psudo HOWTO -- Custom CTF flag base statics



legacy-Org
04-04-2004, 08:26 AM
This is very rough and proably wrong way to allow custom static meshes for the flag bases on a CTF map. Did this for a frield a while back and figured may as well share, someone might find it useful. Anyway:

1) Find xRedFlagBase inside the actor browser and select it

2) Class --> New
Package --> MyLevel
Name --> RedFlagBaseCustom

Script Editor should appear

3) Pase in:


var(xRealCTFBase) StaticMesh baseMesh;

simulated function PostBeginPlay()
{
local xCTFBase xbase;

Super(xRealCTFBase).PostBeginPlay();

if ( Level.NetMode != NM_DedicatedServer )
{
xbase = Spawn(class'xGame.xCTFBase',self,,Location-BaseOffset,rot(0,0,0));
if (baseMesh != None)
{
xbase.setStaticMesh(baseMesh);
}
}
}


4) Tools --> Compile changed
5) Place RedFlagBaseCustom (should be under xRedFlagBase)

On the properties, there should be baseMesh under xRealCTFBase, use that along with the BaseOffset to place the new base

6) Repeat above for xBlueFlagBase