Setting a random texture on directional decal?
Hi there.
[edit]This is UT Classic, not UT 2003 [/edit]
I've been trying to suss this out for a while, and every which way I try it, all ends up with errors.
I've got a random projectile thing working okay, and I thought I could simply use that code to create myself a random decal thing.
Is the code. It just keeps saying in the UCC.log that
It's exactly the same code as the random projectile thing, which is weird. :S
Anyone got any clues?
Cheers
John
Hi there.
[edit]This is UT Classic, not UT 2003 [/edit]
I've been trying to suss this out for a while, and every which way I try it, all ends up with errors.
I've got a random projectile thing working okay, and I thought I could simply use that code to create myself a random decal thing.
Code:
simulated function Landed( vector HitNormal )
{
local DirectionalBlast D;
local float Selection;
if ( Level.NetMode != NM_DedicatedServer )
Selection = FRand();
if ( Selection < 0.4 )
D = Spawn(class'ripperjrm22.gdirectionalblast3',self);
if ( D != None )
D.DirectionalAttach(initialDir, HitNormal);
Explode(Location,HitNormal);
else if ( Selection < 0.7 )
D = Spawn(class'ripperjrm22.gdirectionalblast2',self);
if ( D != None )
D.DirectionalAttach(initialDir, HitNormal);
Explode(Location,HitNormal);
else
D = Spawn(class'ripperjrm22.gdirectionalblast',self);
if ( D != None )
D.DirectionalAttach(initialDir, HitNormal);
Explode(Location,HitNormal);
}
Is the code. It just keeps saying in the UCC.log that
"Error: C:\UNREALTOURNAMENT\ripperjrm22\Classes\grnaltfire3.uc(32) : Error, 'else': Bad command or expression"
It's exactly the same code as the random projectile thing, which is weird. :S
Anyone got any clues?
Cheers
John
Last edited: