The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Screen effects won't stop
Aletho Offline
Junior Member

Posts: 14
Threads: 4
Joined: Jan 2015
Reputation: 0
#1
Screen effects won't stop

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!

void OnStart()

{
// AddEntityCollideBacks
AddEntityCollideCallback("Player", "Felldown", "Teleport1", true, 1);
AddEntityCollideCallback("Player", "Faint", "Faint", true, 1);










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 beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadeSepiaColorTo(0.5f, 0.5f);
FadeRadialBlurTo(0.7f, 0.5f);
FadePlayerRollTo(0, 1.7, 50); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetPlayerMoveSpeedMul(0.2);
PlayMusic("29_amb_end_daniel", false, 3, 3, 10, true);
AddTimer("", 1.0f, "SkidtTekst");
}

void SkidtTekst(string &in asTimer)
{
SetMessage("Thoughts", "skidt", 5.0f);
}




void OnEnter()
{

}


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
}

void TimerChangeMap(string &in asTimer)
{
ChangeMap("Brobyggerne2.map", "PlayerStartArea_1", "", ""); //Changes the map
}

// Functions
void Teleport1(string &in asParent, string &in asChild, int alState)
{

}








void OnLeave()
{
}


//////////////////////
//Functions
void test_this(string &in asEntity, string &in type)
{

}


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
02-27-2015, 12:26 AM
Find


Messages In This Thread
Screen effects won't stop - by Aletho - 02-27-2015, 12:26 AM
RE: Screen effects won't stop - by Darkfire - 02-27-2015, 07:44 PM
RE: Screen effects won't stop - by Neelke - 02-27-2015, 10:36 PM
RE: Screen effects won't stop - by Aletho - 02-28-2015, 12:17 PM
RE: Screen effects won't stop - by Aletho - 03-01-2015, 04:23 PM
RE: Screen effects won't stop - by Mudbill - 03-01-2015, 03:38 PM
RE: Screen effects won't stop - by Mudbill - 03-01-2015, 04:51 PM
RE: Screen effects won't stop - by Aletho - 03-01-2015, 05:15 PM
RE: Screen effects won't stop - by Darkfire - 03-01-2015, 08:57 PM



Users browsing this thread: 1 Guest(s)