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 Wakeup(); help!
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#1
Wakeup(); help!

Hey people! Smile

Im currently trying to make a Wakeup(); function for my Amnesia custom story, and as far as I understood it, I didnt need to change any parameters when I copied the function from the forums.

(Im a newbie, so please be kind). Here is my code:


////////////////////////////
// Run first time starting map
void OnStart()
{
wakeUp();
void wakeUp ()
{
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(6); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
PlayGuiSound("break_wood1.ogg", 1);
PlayGuiSound("general_thunder9.ogg", 1);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 5.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

The error Im getting is:

main (7,8): ERR: Expected '('

main (22,8): ERR: Expected '('

What am I supposed to change?

/Thanks in advance
03-17-2012, 12:02 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Wakeup(); help!

Your OnStart closing curly bracket is in the wrong place.

Tutorials: From Noob to Pro
03-17-2012, 12:12 AM
Website Find
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#3
RE: Wakeup(); help!

(03-17-2012, 12:12 AM)Your Computer Wrote: Your OnStart closing curly bracket is in the wrong place.
Thank you Sir! Smile *problem solved
03-17-2012, 12:16 AM
Find




Users browsing this thread: 1 Guest(s)