Random Skins (code question)
Posted: 28 Jun 2018, 09:20
Hey all, been absent for a while due to extreme real-life stuff (new house, busy job, family life, etc. etc. etc.) Although I don't have time to tackle my bigger projects at the moment, I was working on something small. I was modifying my HD Skins mutator to possibly randomize some of the skins in-game when they spawn (like a 50% chance of being a different skin). I also wanted the projectile and sounds to change with the random skin, but for some reason this code below changes the sounds of ALL the Brutes instead of the one with the random skin change. Any idea why?
This code is in SpawnNotify:
Like I said, the code at the bottom changes the sounds and projectiles of ALL brutes instead of just the one. Any ideas?
This code is in SpawnNotify:
Code: Select all
function ModifyThing( Actor A )
{
if(A.Mesh != None)
{
//Brute
if( A.Mesh == LodMesh'UnrealShare.Brute1' )
{
if( A.Skin == None )
A.Skin = Texture'HDSkins2.HDJBrute1';
else if( A.Skin == Texture'Brute2' )
A.Skin = Texture'HDSkins2.HDBrute2';
else if( A.Skin == Texture'Brute3' )
A.Skin = Texture'HDSkins2.HDBrute3';
//Here is the random skin
else if (rand(100) < 50 && Brute(A).Skin == None )
Brute(A).skin = Texture'AltSkinsHD.BruteAlt';
Brute(A).acquire=Sound'LimboRand.Hulk.BAcquireS';
Brute(A).acquire=Sound'LimboRand.Hulk.BAcquireS';
Brute(A).Die=Sound'LimboRand.Hulk.BDieS';
Brute(A).Die2=Sound'LimboRand.Hulk.BDie2S';
Brute(A).Fear=Sound'LimboRand.Hulk.BFearS';
Brute(A).HitSound1=Sound'LimboRand.Hulk.BHitSound1S';
Brute(A).HitSound2=Sound'LimboRand.Hulk.BHitSound2S';
Brute(A).Roam=Sound'LimboRand.Hulk.BRoamS';
Brute(A).Threaten=Sound'LimboRand.Hulk.BThreatenS';
Brute(A).PistolWhip=Sound'LimboRand.Hulk.BPistolWhipS';
Brute(A).RangedProjectile=Class'RySDemons.LesserBCannon';
Brute(A).ProjectileSpeed=1300;
}
//end of random skin
Like I said, the code at the bottom changes the sounds and projectiles of ALL brutes instead of just the one. Any ideas?