Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 |
/** * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class UTDmgType_Slime extends UTDamageType abstract; static function DoCustomDamageEffects(UTPawn ThePawn, class<UTDamageType> TheDamageType, const out TraceHitInfo HitInfo, vector HitLocation) { local int i, Num; local MaterialInstanceConstant OldMIC, NewMIC; local int ValueIndex; local bool bFoundDiffuse; local Texture DiffuseTexture; if (ThePawn.CurrFamilyInfo != None && ThePawn.CurrFamilyInfo.default.BioDeathMICParent != None) { Num = ThePawn.Mesh.GetNumElements(); for (i = 0; i < Num; i++) { OldMIC = MaterialInstanceConstant(ThePawn.Mesh.GetMaterial(i)); if (OldMIC != None) { // look up the chain until we find an MIC with the texture parameters that we need bFoundDiffuse = FALSE; //bFoundDiffuse = OldMic.GetTextureParameterValue( 'Char_Diffuse', DiffuseTexture ); for( ValueIndex = 0;ValueIndex < OldMic.TextureParameterValues.Length;ValueIndex++) { if( OldMic.TextureParameterValues[ValueIndex].ParameterName == 'Char_Diffuse' ) { OldMic.GetTextureParameterValue( 'Char_Diffuse', DiffuseTexture ); bFoundDiffuse = TRUE; break; } } while( bFoundDiffuse != TRUE ) { OldMic = MaterialInstanceConstant(OldMic.Parent); for( ValueIndex = 0;ValueIndex < OldMic.TextureParameterValues.Length;ValueIndex++) { if( OldMic.TextureParameterValues[ValueIndex].ParameterName == 'Char_Diffuse' ) { OldMic.GetTextureParameterValue( 'Char_Diffuse', DiffuseTexture ); bFoundDiffuse = TRUE; break; } } } OldMIC = MaterialInstanceConstant(ThePawn.Mesh.GetMaterial(i)); OldMIC.SetTextureParameterValue( 'Char_Diffuse', DiffuseTexture ); // duplicate the material (copying its parameter values) // then set the parent to the bio material NewMIC = new(ThePawn) OldMIC.Class(OldMic); NewMIC.SetParent(ThePawn.CurrFamilyInfo.default.BioDeathMICParent); ThePawn.Mesh.SetMaterial(i, NewMIC); } } ThePawn.Mesh.AttachComponent(ThePawn.BioBurnAway, ThePawn.TorsoBoneName); ThePawn.BioBurnAway.ActivateSystem(); ThePawn.bKilledByBio = TRUE; ThePawn.bGibbed=TRUE; // this makes it so you can't then switch to a "gibbing" weapon and get chunks ThePawn.UpdateShadowSettings( FALSE ); } } defaultproperties { DamageBodyMatColor=(R=0.000000,G=50.000000,B=0.000000,A=1.000000) DamageOverlayTime=0.300000 DeathOverlayTime=0.600000 bUseDamageBasedDeathEffects=True DeathString="`o was slimed by `k." FemaleSuicide="`o was slimed." MaleSuicide="`o was slimed." bCausedByWorld=True Name="Default__UTDmgType_Slime" ObjectArchetype=UTDamageType'UTGame.Default__UTDamageType' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |