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 - FlawlessHappiness - 10-24-2012

AddEntityCollideCallback("Brute", "MonsterDisappearArea", "Monsterdisappear", true, 1);


Add this to you void OnStart()


Otherwise the brute will just collide with the script but not calling the function.
You will need to rename the are ("MonsterDisappearArea") because i don't think that's what you called it


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

I completed the chasing after 100 tries of out running the grunts

I wanna know how to change the name of the key because it just says "picked up" but I want it to be called bedroomkey_1 or something.

doesnt work aswell the entityactivate false thing


RE: How to fix the error - The chaser - 10-24-2012

(10-24-2012, 07:31 AM)Josh9810 Wrote: I completed the chasing after 100 tries of out running the grunts

I wanna know how to change the name of the key because it just says "picked up" but I want it to be called bedroomkey_1 or something.

doesnt work aswell the entityactivate false thing
Do this in your script:


void OnStart()
{
AddEntityCollideCallback("Brute", "ScriptArea_disappear", "LOL", true, 1);
}

void LOL (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
}


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

(10-24-2012, 09:13 AM)The chaser Wrote: Do this in your script:


void OnStart()
{
AddEntityCollideCallback("Brute", "ScriptArea_disappear", "LOL", true, 1);
}

void LOL (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
}
Yeah that one doesnt work sadly he sometimes seems to disappear


RE: How to fix the error - The chaser - 10-24-2012

(10-24-2012, 09:22 AM)Josh9810 Wrote:
(10-24-2012, 09:13 AM)The chaser Wrote: Do this in your script:


void OnStart()
{
AddEntityCollideCallback("Brute", "ScriptArea_disappear", "LOL", true, 1);
}

void LOL (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
}
Yeah that one doesnt work sadly he sometimes seems to disappear
Check the names, they are sometimes different. When you re-name something, be sure that you Enter when finished, or otherwise the name will stay.

SetEntityActive("brute", false); ////This should work.


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

To give names to keys you have to write it in your .lang file. I do not have my working computer in front of me right now, so search for it on the forum


RE: How to fix the error - ZodiaC - 10-24-2012

(10-24-2012, 07:31 AM)Josh9810 Wrote: I wanna know how to change the name of the key because it just says "picked up" but I want it to be called bedroomkey_1 or something.
you have to add in your lang file this:
<CATEGORY Name="Inventory">
<Entry Name="ItemName_
KeyName">bedroomkey_1</Entry>
<Entry Name="ItemDesc_
KeyName">The key to the bedroom door.</Entry>

</CATEGORY>


You may need to change the KeyName. And if you need to add more items just add the same lines above the "</CATEGORY>".

(10-24-2012, 09:41 AM)The chaser Wrote: SetEntityActive("brute", false); ////This should work.
So if the entity is registered as "brute" in the Level Editor and you use the name "Brute" in the script it wont work?


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

Quote: So if the entity is registered as "brute" in the Level Editor and you use the name "Brute" in the script it wont work?
In most cases it doesn't, because C++ is case-sensitive, so make sure to write everything exactly how you did in the editor.


RE: How to fix the error - ZodiaC - 10-24-2012

(10-24-2012, 01:11 PM)Ongka Wrote: In most cases it doesn't, because C++ is case-sensitive, so make sure to write everything exactly how you did in the editor.
Hmm I thought it was angelscript and not C++


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

It is, but angelscript uses C++ syntax and as a result pretty much the same rules apply to it.