GetHimNotMe
Junior Member
Posts: 15
Threads: 8
Joined: Apr 2012
Reputation:
0
|
Amnesia Freezing?
Hey,
My amnesia custom story keeps freezing when loading a map. It has something to do with the script because I've tried removing all script functions from the .hps file (leaving only OnStart, OnEnter, etc.) and it would load. There is no crash, only freeze on "Loading..."
Heres my script file:
////////////////////////////
// Run when entering map
void OnStart()
{
PlayMusic("23_amb02.ogg", true, 1.0, 4.0, 0, true);
SetPlayerSanity(50);
AddEntityCollideCallback("Player", "spawnsteve", "comesteve", true, 1);
AddEntityCollideCallback("Player", "dead", "deadend", true, 1);
AddEntityCollideCallBack("steve2", "black", "fadetoblack");
}
void comesteve(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("steve", true);
ShowEnemyPlayerPosition("steve");
}
void deadend(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("lookhere", 3, 3, "looksteve");
}
void looksteve(string &in asTimer)
{
StartPlayerLookAt("steve2", 10, 10, "");
}
void fadetoblack(string &in asTimer)
{
FadeOut(0);
FadeEnemyToSmoke("steve2", true);
StopMusic("23_amb02.ogg", 0);
StopLookAt();
AddTimer("", 3, "switch");
}
void switch(string &in asTimer)
{
ChangeMap("01-2.map", "PlayerStartArea_1", "", "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Thanks in advance!
(This post was last modified: 06-21-2012, 05:16 AM by GetHimNotMe.)
|
|
06-20-2012, 08:59 PM |
|
MaZiCUT
Senior Member
Posts: 536
Threads: 31
Joined: Jun 2012
Reputation:
17
|
RE: Amnesia Freezing?
Maybe it doesen't load anything?
Hi.
(This post was last modified: 06-20-2012, 09:08 PM by MaZiCUT.)
|
|
06-20-2012, 09:08 PM |
|
Apjjm
Is easy to say
Posts: 496
Threads: 18
Joined: Apr 2011
Reputation:
52
|
RE: Amnesia Freezing?
Try the following:
- switch is a reserved word. Try calling your function something different.
- AddEntityCollideCallBack("steve2", "black", "fadetoblack"); is missing the last two parameters, and also has a caps B in the middle which will need to be corrected.
- If this fails, try emptying the script and starting the game in developer mode (see the wiki), then paste the script contents back in, save the map file and click "recompile script and lang", some error messages should pop up indicating what else needs to be fixed.
(This post was last modified: 06-20-2012, 09:44 PM by Apjjm.)
|
|
06-20-2012, 09:44 PM |
|
GetHimNotMe
Junior Member
Posts: 15
Threads: 8
Joined: Apr 2012
Reputation:
0
|
RE: Amnesia Freezing?
(06-20-2012, 09:44 PM)Apjjm Wrote: Try the following:
- switch is a reserved word. Try calling your function something different.
- AddEntityCollideCallBack("steve2", "black", "fadetoblack"); is missing the last two parameters, and also has a caps B in the middle which will need to be corrected.
- If this fails, try emptying the script and starting the game in developer mode (see the wiki), then paste the script contents back in, save the map file and click "recompile script and lang", some error messages should pop up indicating what else needs to be fixed.
Wow, completely overlooked that. Thanks!
|
|
06-21-2012, 02:12 AM |
|
|