Hey, so im trying to change the post process settings based on the player's movement speed. This function is called in a tick and changes smoothly and gradually as the player is attacked.
Specifically im trying to desaturate the scene as the player is slowed down. I have a log in there to check the desaturation and it works perfectly. As the player is slowed down, the desaturation value gradually goes from 0 to 1. It just doesnt actually desaturate the scene. I suppose its something wrong with LocalPlayer(PlayerController(Target.Controller).Pl ayer).OverridePostProcessSettings(NewPPSettings); but ive used this before and it worked.
Anyone know whats going on? Am I not referencing the player's post process desaturation value correctly? how do i log the player's post process desaturation value instead of just my new settings version of it?
Specifically im trying to desaturate the scene as the player is slowed down. I have a log in there to check the desaturation and it works perfectly. As the player is slowed down, the desaturation value gradually goes from 0 to 1. It just doesnt actually desaturate the scene. I suppose its something wrong with LocalPlayer(PlayerController(Target.Controller).Pl ayer).OverridePostProcessSettings(NewPPSettings); but ive used this before and it worked.
Anyone know whats going on? Am I not referencing the player's post process desaturation value correctly? how do i log the player's post process desaturation value instead of just my new settings version of it?
Code:
function SlowDownPlayer()
{
local PostProcessSettings NewPPSettings;
NewPPSettings = LocalPlayer(PlayerController(Target.Controller).Player).CurrentPPInfo.LastSettings;
NewPPSettings.bEnableSceneEffect = true;
if(Target.GroundSpeed > 0)
{
Target.GroundSpeed -= 1;
//Set scene desaturation to the Player's movement speed percentage.
NewPPSettings.Scene_Desaturation = 1 - (Target.GroundSpeed/Target.default.GroundSpeed);
//Override the Player's post process settings with the augmented one.
LocalPlayer(PlayerController(Target.Controller).Player).OverridePostProcessSettings(NewPPSettings);
`log(NewPPSettings.Scene_Desaturation);
}
}
Last edited: