Ban_SeqAct_DoFullLightEnvUpdate and Ban_SeqAct_NPCManagerUpdate
Kismet Nodes that immediately update the lighting and tick optimization on an NPC or Enemy that has been teleported or unhidden
"NPC Manager Update" will update which NPCs or Enemies should update their lighting and animations, and which shouldn't (which is usually done twice every second or so). Useful after unhiding or teleporting an NPC that hasn't been shown in the level yet, as it would normally show up pitch black for half a second. (not needed for NPCs or Enemies that have their "Tick Optimization" disabled)
"Full Light Environment Update" will immediately update the lighting on the NPC / Enemy. This is useful after the NPC has been teleported, so there's no visible fade from the previous lighting to the new lighting.
Note: These scripts should be renamed to avoid conflicts with other mods that might use these kismet nodes, for example: NICKNAME_SeqAct_DoFullLightEnvUpdate
and NICKNAME_SeqAct_NPCManagerUpdate
class Ban_SeqAct_NPCManagerUpdate extends SequenceAction; /** A property used by the UpdateGroups() function. Usually you'll want this turned on. */ var() bool ImmediateUpdate; event Activated() { //note: `NPCManager == Hat_GameNPCManager if (ImmediateUpdate) `NPCManager.OnCameraCut(); else `NPCManager.DoNPCManagerUpdate(); } defaultproperties { ObjName="NPC Manager Update" ObjCategory="Actor" bCallHandler=false VariableLinks.Empty ImmediateUpdate = true }
class Ban_SeqAct_DoFullLightEnvUpdate extends SequenceAction; event Activated() { local int i; local Actor Target; local DynamicLightEnvironmentComponent LE; //go through all targets (support multiple targets) for (i=0; i<Targets.Length; i++) { Target = Actor(Targets[i]); if (Target == None) continue; //go through all of the light environments this actor owns (usually one) foreach Target.AllOwnedComponents(class'DynamicLightEnvironmentComponent', LE) { //from DynamicLightEnvironmentComponent: light environment does a full update of its surrounding lights LE.ResetEnvironment(); //from ActorComponent: without this, the actor will still have the old lighting on it for one frame LE.ForceUpdate(false); } } } defaultproperties { ObjName="Full Light Environment Update" ObjCategory="Actor" bCallHandler=false }