Frictional Games Forum (read-only)
How to fix the error - 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: How to fix the error (/thread-18893.html)

Pages: 1 2 3


RE: How to fix the error - Josh9810 - 10-25-2012

Nope theyre all Brute and the SetEntityActive("Brute", false); doesnt work do I have to be a certain distance away from him or can I be like less than 5 meters away from him?


RE: How to fix the error - Ongka - 10-25-2012

(10-25-2012, 05:35 AM)Josh9810 Wrote: Nope theyre all Brute and the SetEntityActive("Brute", false); doesnt work do I have to be a certain distance away from him or can I be like less than 5 meters away from him?
SetEntityActive("Brute", false); deactivates the monster no matter how far he's away from you.
It seems your function doesn't get executed. Make sure you've set the entitycollidecallback right and look for typos.


RE: How to fix the error - FlawlessHappiness - 10-25-2012

SetEntityActive() works everywhere


RE: How to fix the error - Josh9810 - 10-25-2012

void OnStart()
{
AddEntityCollideCallback("Player", "brutey", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisableTriggers("Brute", true);
SetEntityActive("Brute", true);
AddEnemyPatrolNode("Brute", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Brute", "PathNodeArea_12", 0, "");
AddUseItemCallback("", "key", "unlock", "unlockdoor", true);
}
void unlockdoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("unlock", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "unlock", 0, false);
RemoveItem("key");
AddEntityCollideCallback("Brute", "brute_go", "Monsterdisappear", true, 1);
}
void Monsterdisappear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
}
___________________________________________________________________________________

Is anything wrong... Any typos any spelling mistakes any thing I should move, remove or change to get it to work properly???


RE: How to fix the error - Ongka - 10-25-2012

So the area which activates the Brute is called brutey, the area in which the Brute walks is called brute_go. Check if the names are the same in the editor and make sure the areas are big enough.
Not sure if SetEnemyDisableTriggers("Brute", true); disables interaction with areas too.
You may try to add SetEnemyDisableTriggers("Brute", false); to "unlockdoor".
Code:
void unlockdoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("unlock", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "unlock", 0, false);
RemoveItem("key");
AddEntityCollideCallback("Brute", "brute_go", "Monsterdisappear", true, 1);
SetEnemyDisableTriggers("Brute", false);
}



RE: How to fix the error - Josh9810 - 10-26-2012

the door unlocks fine and he follows the track algoods too but he gets to the area and doesnt go away so ill check and change. Thanks for all help though

I realized when im in the room when he is on the mode where doesn't care and leaves you alone SetEnemyDisableTriggers("Brute", true); i can push him into the area and he disappears but when he clearly walks through him self he just turns around and goes back to the start of the track and repeats.


RE: How to fix the error - Josh9810 - 10-26-2012

and now my custom story doesnt even show up on the list?? Sad
What am I doing wrong??

If needed ill show all my files or it.

Fixed it
dont worry

Edit: Dont even worry anymore ill find a way its workin good now I have two monsters set up and the both scare me even when I expect them XD jk. Thanks for all help and stuff guys.