Frictional Games Forum (read-only)
Another crashing hps. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Another crashing hps. (/thread-18644.html)

Pages: 1 2


Another crashing hps. - candlejack131 - 10-05-2012

I cant seem to find at all whats wrong with this hps ////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "SlenderMan", "slendy", true, 1);
SetEntityPlayerLookAtCallback("SlenderDude", "Kill", true);
AddUseItemCallback("", "key_laboratory_1", "mansion_6", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "DICKY", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "happynow", "kyle", true, 1);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_6", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_6", 0, false);
RemoveItem("key_laboratory_1");
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
}
void slendy(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SlenderDude", true);
}

void Kill(string &in Entity, int alState)
{
GivePlayerDamage(100, "Slash", false, true);
}

void kyle(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("kyle_1", true);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_6", true, true);
}

SetSwingDoorClosed("door1", true, true);
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

I've looked over it several times and can't tell whats wrong.


RE: Another crashing hps. - Adny - 10-05-2012

This:


Spoiler below!


SetSwingDoorClosed("door1", true, true);
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}



For some reason, you callback syntax+name is it's own function; seeing how I don't know what this function even is, I can't provide a fix beyond pointing out the mistake.

It should be more like:

Spoiler below!


NAMEOFFUNC(string &in asX, string &in asY, int alState)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}


Hope that helped.


RE: Another crashing hps. - The chaser - 10-05-2012

Agree woth Andyrockin. That "Swing door closed" out of any void should be the problem. Check if it's the problem and let's see what happens.

I've also noticed some words saying Slender... Cool.


RE: Another crashing hps. - candlejack131 - 10-05-2012

I updated the hps to this ////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "SlenderMan", "slendy", true, 1);
SetEntityPlayerLookAtCallback("SlenderDude", "Kill", true);
AddUseItemCallback("", "key_laboratory_1", "mansion_6", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "DICKY", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "happynow", "kyle", true, 1);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_6", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_6", 0, false);
RemoveItem("key_laboratory_1");
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
}
void slendy(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SlenderDude", true);
}

void Kill(string &in Entity, int alState)
{
GivePlayerDamage(100, "Slash", false, true);
}

void kyle(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("kyle_1", true);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_6", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
{
////////////////////////////
// Run when entering map
void OnEnter()
}

{
and its still crashing


RE: Another crashing hps. - Obliviator27 - 10-05-2012

void func_slam(string &in asParent, string &in asChild, int alState)

{

SetSwingDoorClosed("mansion_6", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);

}

That's what you have wrong.
When it crashes, it tells you where in the script it went wrong.


RE: Another crashing hps. - candlejack131 - 10-05-2012

(10-05-2012, 11:05 PM)Obliviator27 Wrote: void func_slam(string &in asParent, string &in asChild, int alState)

{

SetSwingDoorClosed("mansion_6", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);

}

That's what you have wrong.
When it crashes, it tells you where in the script it went wrong.
Ok i have a high end but "strange" graphics card. When it crashes OR minimizes i get a entire black screen i can't minimize out of. There is absolutely no way out of it except for rebooting. This is why i didn't just go by the error because it won't let me "see" the error i get all black an obnoxious noise and my mouse. That's it other wise me and my actual scripter would have a lot easier of a time doing all this.


RE: Another crashing hps. - Rapture - 10-05-2012

Does Ctrl + Alt + Delete not work? I would be surprised if your computer locks up so badly that you couldn't access your Task manager to crash Amnesia.

And Amnesia doesn't work to well when you minimize it, I would set Amnesia to Windows mode (Lower your graphics setting to if your FPs drops) if your testing your CS.

Whats your "high end strange graphics card" btw?


RE: Another crashing hps. - candlejack131 - 10-05-2012

(10-05-2012, 11:35 PM)Rapture Wrote: Does Ctrl + Alt + Delete not work? I would be surprised if your computer locks up so badly that you couldn't access your Task manager to crash Amnesia.

And Amnesia doesn't work to well when you minimize it, I would set Amnesia to Windows mode (Lower your graphics setting to if your FPs drops) if your testing your CS.

Whats your "high end strange graphics card" btw?
i never considered Ctrl+alt+delete. Thanks for the suggestion though and i have a radeon 6700 0r 7500 I can't find its box to double check although it is high end. I can run skyrim+high resolution texture pack on ultra high with no lag and same goes for any other steam game lag isn't something i personally need to worry about.


RE: Another crashing hps. - candlejack131 - 10-06-2012

(10-05-2012, 10:44 PM)The chaser Wrote: Agree woth Andyrockin. That "Swing door closed" out of any void should be the problem. Check if it's the problem and let's see what happens.

I've also noticed some words saying Slender... Cool.
Yea i recheck it with the script guide that i used to write it and it doesn't belong there i fixed that however. Yet it is still crashing

Also my Graphics card is AMD radeon 6700 just found the box.

Fixed it.

Turns out i had an extra (what me and my friends refer to as a) mustache key or { that wasn't needed.


RE: Another crashing hps. - Statyk - 10-06-2012

Haha, just a heads up, it's known as a bracket. Mustache isn't too bad of an idea either!