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.
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
//FadeImageTrailTo(3, 1);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(65, 100, 100); // "Tilts" the players head
FadeRadialBlurTo(0.4, 1);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
void Faint(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "react_sigh1.snt", "Faint", 0.0, false);
FadePlayerRollTo(65, 100, 100); //Rotates the position of the camera on the player's body.
//afX - angle of rotation of head, positive being counter-clockwise
//afSpeedMul - speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)
//afMaxSpeed - maximum speed of rotation
SetPlayerCrouching(true);
SetPlayerActive(false);
FadeImageTrailTo(3, 1);
FadeOut(5.0f);
AddTimer("fadeout", 5.5f, "TimerChangeMap");
//Applies the image trail effect to the screen.
//afAmount - intensity (default: 0)
//afSpeed - time in seconds until full effect
FadeRadialBlurTo(0.4, 1);
//Applies radial blur effects to the screen.
//afSize - intensity (default: 0)
//afSpeed - time in seconds until full effect
}
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
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 ?
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 :-)
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.
Quote:FadeRadialBlurTo(float afSize, float afSpeed);
Applies radial blur effects to the screen.
afSize - intensity (default: 0) afSpeed - time in seconds until full effect
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.
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);
(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.