[SCRIPT] Screen effects won't stop - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Screen effects won't stop (/thread-29671.html) |
Screen effects won't stop - Aletho - 02-27-2015 Hey guys! Here's the thing: I have 2 maps. The first one ends with the player fainting and then loading the next map. In the first map, there's a lot of screen effects as you can see in the script below. Now, the problem is that when the second map has loaded, it keeps the blurred slow-mo-ish screen effect. I can't seem to fix it no matter what I try, so I hope you know how to solve this. Here's the script for map 1: Spoiler below!
As you can see, FadeToImageTrail, FadeIn/Out, SepiaColor and RadialBlur are the screen effects in use. The commands i've tried so far without luck are: FadeRadialBlurTo(0, 0); FadeImageTrailTo(0, 0); ChangePlayerStateToNormal(); Again, I hope you know how to fix it! Thanks in advance, Alex RE: Screen effects won't stop - Darkfire - 02-27-2015 Well, as far as I can see you turn effects on, turn them off and then on again, so what's the problem ? You just have to turn them off again o_O Btw, you sure that 0.0f AREN'T the deafult settings ? RE: Screen effects won't stop - Neelke - 02-27-2015 I think you can reset the effects when leaving map instead. I did that in one of my maps and it worked just fine. Code: void OnLeave() RE: Screen effects won't stop - Aletho - 02-28-2015 (02-27-2015, 10:36 PM)Neelke Wrote: I think you can reset the effects when leaving map instead. I did that in one of my maps and it worked just fine. That's exactly the code I had in my "void OnStart()" in the following map, but it wouldn't turn it off. I can try again with using it in the "void OnLeave()" and post the results :-) RE: Screen effects won't stop - FlawlessHappiness - 03-01-2015 It's very simple! Copied from the engine scripts: https://wiki.frictionalgames.com/doku.php?id=hpl2/amnesia/script_functions Quote:FadeRadialBlurTo(float afSize, float afSpeed); Notice the second one is called speed? If you set speed to 0, would anything every change? You have to make speed more than 0. RE: Screen effects won't stop - Mudbill - 03-01-2015 Well, I mean, it IS "time in seconds." Using 0 should theoretically make the effect fully enable over the course of 0 seconds, EG instantly. If this is not the actual case, that should be fixed. RE: Screen effects won't stop - Aletho - 03-01-2015 (03-01-2015, 01:29 PM)FlawlessHappiness Wrote: It's very simple! Nothing seems to be working. This is what I have in the void OnStart in the second map: FadeRadialBlurTo(0, 1); FadeImageTrailTo(0, 0); SetPlayerCrouching(false); ChangePlayerStateToNormal(); StopPlayerLookAt(); SetPlayerMoveSpeedMul(1); SetPlayerSanity(100); RE: Screen effects won't stop - Mudbill - 03-01-2015 Are you sure your second map's hps file is properly loaded? Do you have other scripts in there that do work? RE: Screen effects won't stop - Aletho - 03-01-2015 (03-01-2015, 04:51 PM)Mudbill Wrote: Are you sure your second map's hps file is properly loaded? Do you have other scripts in there that do work? I have a lot of scripts in the second map's hps file, all of them work. I've just decided to completely remove all the "FadeImageTrailTo" scripts in the first map and that worked. RE: Screen effects won't stop - Darkfire - 03-01-2015 You shure that you executed that script ? I dunno put smth like SetEntityActive in there to make sure it is called at all |