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
I need help with my Custom Story!
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#1
I need help with my Custom Story!

So here is my Intro Map Script, i'm trying to add a "Wake Up Effect" But when i try to launch my Custom Story it crashes! Any Suggestions?
void OnStart()
{
SetPlayerActive(false);
FadeOut(0);
//FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
AddTimer("activate_player", 3, "FadeIn");
SetLightVisible("BoxLight_1", false);
SetPlayerSanity(50);
AddUseItemCallback("OpenDoor", "MedicalKey", "level_wood_1", "UnlockLevelDoor", true);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void UnlockLevelDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
GiveSanityBoostSmall();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OnLeave()
{
SetupLoadScreen("Loading","LoadScreen1",0,"LoadScreenImage1.jpg");
}
////////////////////////////////////////////////////////////////////////////////////////
void FadeIn(string &in timer_name)
{
FadeIn(2);
AddTimer("Start", 2, "WakeUp");
}
void WakeUp(string &in timer_name)
{
if (timer_name == "Start")
{
SetLightVisible("Box_Light_1", true);
AddTime("MoveHead", 1, "WakeUp");
}
else if (timer_name == "MoveHead")
{
MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
else if(timer_name == "ActivatePlayer");
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);
}
}
}
03-22-2014, 04:18 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#2
RE: I need help with my Custom Story!

can you copy down the crash message? It makes it easier to find the bug
03-22-2014, 04:24 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#3
RE: I need help with my Custom Story!

(03-22-2014, 04:24 AM)valetheimpaler Wrote: can you copy down the crash message? It makes it easier to find the bug

Here is the Crash Message:

FATAL ERROR: Could not load script file
'custom_stories/Amnesia_Fading Away/maps/01.hps'!
main(43, 1):ERR: Expected expression value
03-22-2014, 04:28 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#4
RE: I need help with my Custom Story!

go down to line 43, get rid of the semicolon at the end
else if(timer_name == "ActivatePlayer");
should be
else if(timer_name == "ActivatePlayer")
let me know if that fixes it

btw, the crash usually says which line on the script it is (hence the 43) so try looking near the line of that number for help.
If your text editor deosnt show line #, try looking up notepadd ++ or something
(This post was last modified: 03-22-2014, 04:33 AM by Vale.)
03-22-2014, 04:32 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#5
RE: I need help with my Custom Story!

(03-22-2014, 04:32 AM)valetheimpaler Wrote: go down to line 43, get rid of the semicolon at the end
else if(timer_name == "ActivatePlayer");
should be
else if(timer_name == "ActivatePlayer")
let me know if that fixes it

btw, the crash usually says which line on the script it is (hence the 43) so try looking near the line of that number for help.
If your text editor deosnt show line #, try looking up notepadd ++ or something

Nope that didn't work unfortunately :/
03-22-2014, 04:36 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#6
RE: I need help with my Custom Story!

is the crash text any different?
03-22-2014, 04:38 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#7
RE: I need help with my Custom Story!

(03-22-2014, 04:38 AM)valetheimpaler Wrote: is the crash text any different?

Nope :/
03-22-2014, 04:40 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#8
RE: I need help with my Custom Story!

ok, while i was waiting found another error. Needs to be a bracket the line before the one i edited for you.
Missing the opposite for the previous one.
Also, you dont need that last bracket i dont think
03-22-2014, 04:41 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#9
RE: I need help with my Custom Story!

(03-22-2014, 04:41 AM)valetheimpaler Wrote: ok, while i was waiting found another error. Needs to be a bracket the line before the one i edited for you.
Missing the opposite for the previous one.
Also, you dont need that last bracket i dont think

It still crashes :/
03-22-2014, 04:47 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#10
RE: I need help with my Custom Story!

hmmmmmmmmmmmmm
post your current code
03-22-2014, 04:48 AM
Find




Users browsing this thread: 3 Guest(s)