Frictional Games Forum (read-only)
Extra_english.lang file aint working - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Extra_english.lang file aint working (/thread-8238.html)

Pages: 1 2 3 4


RE: Extra_english.lang file aint working - Khyrpa - 05-25-2011

Interact callback is when Parent (Player in this case) interacts (with your mouse) with the Child (door_open_hall_key. Its the door itself, right?)
If you want player to trigger it entering an area, use collidecallback. Just create the script area and name it, then place it at the string& asChildName
like in your case:
AddEntityCollideCallback("Player", "name of the area", "Doorslam1", true, 1);



RE: Extra_english.lang file aint working - xtron - 05-25-2011

It still doesn't work

Here's my script
Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "door_open_hall_key", "Doorslam1", true, 1);
}

void Doorslam1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_to_hall_key", true, true);
StartPlayerLookAt("door_to_hall_key", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");
}

Void stoplook(strin &in asTimer)
{
StopPlayerLookAt();
}




And here's my entity names etc in hpl2 editor.
Spoiler below!

Script area:
GENERAL
Name: door_open_hall_key
[X] Active

AREA
PlayerLookAtCallback: door_open_hall_key
[X] PlayerLookAtcallBackAutoRemo...

The door:
GENERAL
Name: door_to_hall_key
[X] Active

ENTITY
[X] CastShadows
CallbackFunc: door_to_hall_key
OpenAmount: 1

These are my settings for the scriptarea and for the door. The settings I didn't mention, I didn't change at all.




RE: Extra_english.lang file aint working - Khyrpa - 05-25-2011

(strin &in asTimer) to (string &in asTimer)
and
Void to void

and you can drop this:
ENTITY
[X] CastShadows
CallbackFunc: -->door_to_hall_key<--
OpenAmount: 1

unless you plan to use it


RE: Extra_english.lang file aint working - xtron - 05-25-2011

(05-25-2011, 06:15 PM)Khyrpa Wrote: I think ill try and re-create the whole script for you. Just to be sure wtf Big Grin and not to mislead you further :S

Great! Thank you man! Smile


EDIT: Wtf, Still doesn't work...

Should i upload my .map file so you can take a look at the door and script?


RE: Extra_english.lang file aint working - Khyrpa - 05-25-2011

Damn btw. I got confused by all those: Hall_to_Key_something
I think I guided wrong or smthing :p


RE: Extra_english.lang file aint working - xtron - 05-25-2011

(05-25-2011, 06:26 PM)Khyrpa Wrote: Damn btw. I got confused by all those: Hall_to_Key_something
I think I guided wrong or smthing :p

door name: door_to_hall_key
scriptname: door_open_hall_key

Dunno why I picked the "door_open_hall_key" but yea ;D


RE: Extra_english.lang file aint working - Khyrpa - 05-25-2011

but did you get it working?
Spoiler below!


void OnStart()
{
AddEntityCollideCallback("Player", "door_open_hall_key", "Doorslam1", true, 1);
}

void Doorslam1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_to_hall_key", true, true);
StartPlayerLookAt("door_to_hall_key", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");
}

void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}

I suggest you rename the damn area to: door_hall_key_area


RE: Extra_english.lang file aint working - xtron - 05-25-2011

Doesn't work.


RE: Extra_english.lang file aint working - Khyrpa - 05-25-2011

what the hell.. it worked fine with me! I used the same names and all... What error does it say? Is the door blocked? does the LookAt start?


RE: Extra_english.lang file aint working - xtron - 05-25-2011

Nothing happens. I just walk through the script area. It doesn't even start the lookat function.