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
Sanity problems
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#1
Sanity problems

As mentioned in my earlier thread, I had a problem loading one of my maps. I found that if I deleted the GiveSanityBoost command however, that it would run fine. Am I not using the correct command or something?

I'll repost my script:

void OnStart()
{
FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", true, 1, 3, 0, true);
PlaySoundAtEntity("", "door_level_wood_close.snt", "secretbookcase", 0, false);
GiveSanityBoost(80);
}

void OnEnter()
{
}

Am I using that command wrong or something? should I substitute it with another?

Fratricide (title not finalized): 2/7 maps. :D
08-31-2011, 03:21 AM
Find Reply
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Sanity problems

(08-31-2011, 03:21 AM)Bennick Wrote: As mentioned in my earlier thread, I had a problem loading one of my maps. I found that if I deleted the GiveSanityBoost command however, that it would run fine. Am I not using the correct command or something?

I'll repost my script:

void OnStart()
{
FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", true, 1, 3, 0, true);
PlaySoundAtEntity("", "door_level_wood_close.snt", "secretbookcase", 0, false);
GiveSanityBoost(80);
}

void OnEnter()
{
}

Am I using that command wrong or something? should I substitute it with another?

Hah, silly me. xD

Change this:

GiveSanityBoost(80);

To this:

GiveSanityBoost();


But from what the error report said, it was far from a normal error. What you need to do is to make sure that the command functions you use are correctly used, based on the script functions page. Smile

08-31-2011, 03:26 AM
Find Reply
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#3
RE: Sanity problems

(08-31-2011, 03:26 AM)Kyle Wrote:
(08-31-2011, 03:21 AM)Bennick Wrote: As mentioned in my earlier thread, I had a problem loading one of my maps. I found that if I deleted the GiveSanityBoost command however, that it would run fine. Am I not using the correct command or something?

I'll repost my script:

void OnStart()
{
FadeOut(0);
FadeIn(15);
PlayMusic("10_amb.ogg", true, 1, 3, 0, true);
PlaySoundAtEntity("", "door_level_wood_close.snt", "secretbookcase", 0, false);
GiveSanityBoost(80);
}

void OnEnter()
{
}

Am I using that command wrong or something? should I substitute it with another?

Hah, silly me. xD

Change this:

GiveSanityBoost(80);

To this:

GiveSanityBoost();


But from what the error report said, it was far from a normal error. What you need to do is to make sure that the command functions you use are correctly used, based on the script functions page. Smile

Wow! that autofills your sanity?? Awesome! Big Grin thanks!

As for the error, I know it sounded serious, but wouldn't it have crashed Amnesia again with part of the error message if it had other errors?

Also, should I be adding an OnLeave section to each of my maps' script files?

Fratricide (title not finalized): 2/7 maps. :D
08-31-2011, 04:28 AM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Sanity problems

(08-31-2011, 04:28 AM)Bennick Wrote: that autofills your sanity?

I think it only adds 50 sanity, and i think the small boost adds 25.

(08-31-2011, 04:28 AM)Bennick Wrote: As for the error, I know it sounded serious, but wouldn't it have crashed Amnesia again with part of the error message if it had other errors?

Technically, it should display all errors in the same dialog box; programs can only crash once during their run time.

(08-31-2011, 04:28 AM)Bennick Wrote: Also, should I be adding an OnLeave section to each of my maps' script files?

Only if you want something to happen when the player leaves the map.

Tutorials: From Noob to Pro
(This post was last modified: 08-31-2011, 06:41 AM by Your Computer.)
08-31-2011, 06:40 AM
Website Find Reply




Users browsing this thread: 1 Guest(s)