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 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 |
/** * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. * Actor placed in level and used to preview different custom character combinations. * Does not use skeletal mesh merging, so changing parts is quick. */ class UTCustomChar_Preview extends Actor dependson(UTCustomChar_Data) placeable native; var() SkeletalMeshComponent AnimComp; var() SkeletalMeshComponent HeadComp; var() SkeletalMeshComponent HelmetComp; var() SkeletalMeshComponent FacemaskComp; var() SkeletalMeshComponent GogglesComp; var() SkeletalMeshComponent TorsoComp; var() SkeletalMeshComponent LShoPadComp; var() SkeletalMeshComponent RShoPadComp; var() SkeletalMeshComponent ArmsComp; var() SkeletalMeshComponent ThighsComp; var() SkeletalMeshComponent BootsComp; /** Info about character currently being used. */ var() UTCustomChar_Data.CharacterInfo Character; var() UTCustomChar_Data.CustomCharMergeState MergeState; /** */ var() SkeletalMeshActor TestMergeActor; var() MaterialInstanceConstant TestMIC; var() MaterialInstanceConstant TestMIC2; var() MaterialInstanceConstant TestMIC3; var UTCharFamilyAssetStore FamilyAssets; /** In the char editor, used to find the right UTCustomChar_Preview for each faction. */ var() string UseForFaction; /** Used for easily setting */ var() LightingChannelContainer CharLightingChannels; // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) /** Set a particular part of the preview character, based on its short ID. */ native function SetPart(UTCustomChar_Data.ECharPart InPart, string InPartID); /** Set the entire preview character to a specified profile. */ native function SetCharacter(string InFaction, string InCharID); /** Sets the preview character's data to the specified char data struct. */ native function SetCharacterData(UTCustomChar_Data.CustomCharData InCharData); /** Notification when the character data has changed so the preview actor can update the data in-game. */ native function NotifyCharacterDataChanged(); event PostBeginPlay() { Super.PostBeginPlay(); if(TestMergeActor != None) { //FamilyAssets = class'UTCustomChar_Data'.static.LoadFamilyAssets("TWIF", FALSE); FamilyAssets = class'UTCustomChar_Data'.static.LoadFamilyAssets("IRNM", FALSE, FALSE); //SetCharacter(class'UTCustomChar_Data'.default.Characters[4].Faction, class'UTCustomChar_Data'.default.Characters[4].CharID); SetCharacter(class'UTCustomChar_Data'.default.Characters[0].Faction, class'UTCustomChar_Data'.default.Characters[0].CharID); } } /** Handler for 'SetCustomCharPart' kismet action **/ event OnSetCustomCharPart(UTSeqAct_SetCustomCharPart Action) { //`log("SET PART:"@Action.Part@Action.PartID); SetPart(Action.Part, Action.PartID); } /** Handler for 'SetCustomCharCharacter' kismet action **/ event OnSetCustomCharProfile(UTSeqAct_SetCustomCharProfile Action) { //`log("SET PROFILE:"@Action.Faction@Action.CharName); SetCharacter(Action.Faction, Action.CharID); } /** For testing merging - when toggled - create new merged skeletal mesh and assign to place SkeletalMeshActor.*/ event OnToggle(SeqAct_Toggle Action) { //local CustomCharData CharData; if(TestMergeActor != None && FamilyAssets != None && !MergeState.bMergeInProgress) { // See if all assets required are loaded. if(FamilyAssets.NumPendingPackages == 0) { //CharData = class'UTCustomChar_Data'.static.MakeRandomCharData(); MergeState = class'UTCustomChar_Data'.static.StartCustomCharMerge(Character.CharData, "VRed", None, CCTR_Normal); } else { LogInternal("Cannot merge yet - "$FamilyAssets.NumPendingPackages$" packages pending."); } } } event Tick(float DeltaTime) { local SkeletalMesh NewMesh; local Texture HeadTex, BodyTex; local Texture PortraitTex; if(MergeState.bMergeInProgress) { HeadTex = MergeState.HeadTextures[0]; BodyTex = MergeState.BodyTextures[0]; NewMesh = class'UTCustomChar_Data'.static.FinishCustomCharMerge(MergeState); if(NewMesh != None) { PortraitTex = class'UTCustomChar_Data'.static.MakeCharPortraitTexture(NewMesh, class'UTCustomChar_Data'.default.PortraitSetup, class'UTCustomChar_Data'.default.PortraitBackgroundMesh); TestMergeActor.SkeletalMeshComponent.SetSkeletalMesh(NewMesh); if(TestMIC != None) { TestMIC.SetTextureParameterValue('TestTex', HeadTex); } if(TestMIC2 != None) { TestMIC2.SetTextureParameterValue('TestTex', BodyTex); } if(TestMIC3 != None) { TestMIC3.SetTextureParameterValue('TestTex', PortraitTex); } } } } defaultproperties { Begin Object Class=SkeletalMeshComponent Name=MyAnimComp ObjName=MyAnimComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA' Begin Object Class=AnimNodeSequence Name=AnimNodeSeq0 ObjName=AnimNodeSeq0 Archetype=AnimNodeSequence'Engine.Default__AnimNodeSequence' AnimSeqName="idle_ready_rif" bPlaying=True bLooping=True Name="AnimNodeSeq0" ObjectArchetype=AnimNodeSequence'Engine.Default__AnimNodeSequence' End Object Animations=AnimNodeSequence'UTGame.Default__UTCustomChar_Preview:AnimNodeSeq0' AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale' bHasPhysicsAssetInstance=True bEnableFullAnimWeightBodies=True HiddenGame=True BlockRigidBody=True RBChannel=RBCC_Untitled4 RBCollideWithChannels=(Untitled4=True) Name="MyAnimComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object AnimComp=MyAnimComp Begin Object Class=SkeletalMeshComponent Name=MyHeadComp ObjName=MyHeadComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyHeadComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object HeadComp=MyHeadComp Begin Object Class=SkeletalMeshComponent Name=MyHelmetComp ObjName=MyHelmetComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyHelmetComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object HelmetComp=MyHelmetComp Begin Object Class=SkeletalMeshComponent Name=MyFacemaskComp ObjName=MyFacemaskComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyFacemaskComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object FacemaskComp=MyFacemaskComp Begin Object Class=SkeletalMeshComponent Name=MyGogglesComp ObjName=MyGogglesComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyGogglesComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object GogglesComp=MyGogglesComp Begin Object Class=SkeletalMeshComponent Name=MyTorsoComp ObjName=MyTorsoComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyTorsoComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object TorsoComp=MyTorsoComp Begin Object Class=SkeletalMeshComponent Name=MyLShoPadComp ObjName=MyLShoPadComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyLShoPadComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object LShoPadComp=MyLShoPadComp Begin Object Class=SkeletalMeshComponent Name=MyRShoPadComp ObjName=MyRShoPadComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyRShoPadComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object RShoPadComp=MyRShoPadComp Begin Object Class=SkeletalMeshComponent Name=MyArmsComp ObjName=MyArmsComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyArmsComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object ArmsComp=MyArmsComp Begin Object Class=SkeletalMeshComponent Name=MyThighsComp ObjName=MyThighsComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyThighsComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object ThighsComp=MyThighsComp Begin Object Class=SkeletalMeshComponent Name=MyBootsComp ObjName=MyBootsComp Archetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' ParentAnimComponent=SkeletalMeshComponent'UTGame.Default__UTCustomChar_Preview:MyAnimComp' Name="MyBootsComp" ObjectArchetype=SkeletalMeshComponent'Engine.Default__SkeletalMeshComponent' End Object BootsComp=MyBootsComp Character=(AIData=(Aggressiveness=0.400000,CombatStyle=0.200000)) Components(0)=MyAnimComp Components(1)=MyTorsoComp Components(2)=MyHeadComp Components(3)=MyHelmetComp Components(4)=MyFacemaskComp Components(5)=MyGogglesComp Components(6)=MyLShoPadComp Components(7)=MyRShoPadComp Components(8)=MyArmsComp Components(9)=MyThighsComp Components(10)=MyBootsComp Name="Default__UTCustomChar_Preview" ObjectArchetype=Actor'Engine.Default__Actor' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |