Frictional Games Forum (read-only)
message help - 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: message help (/thread-12231.html)

Pages: 1 2 3 4


message help - eagledude4 - 01-01-2012

Solved.


RE: message help - flamez3 - 01-01-2012

You need to use your extra_english.lang to do messages.
Put this into your extra_english.lang:


<CATEGORY Name="Messages">
<Entry Name="Hint1">text</Entry>
</CATEGORY>

You can add more hint's by adding more entries. For the script. It would be like this:

SetMessage("Messages", "Hint1", 0);



RE: message help - eagledude4 - 01-01-2012

I figured that out before you posted, please read the first post again. The category name doesn't have to be "Messages" does it?



RE: message help - eagledude4 - 01-01-2012

Help?


RE: message help - Statyk - 01-01-2012

The "CustomStoryMain" is reserved for text in the description of a custom story. Put it in another category like this...

<CATEGORY Name="MiscMessages">
<Entry Name="Barrier">I should investigate my father's room before heading downstairs</Entry>
</CATEGORY>






RE: message help - eagledude4 - 01-01-2012

Thanks, I didn't know it worked like that, but the message still isn't showing.

Lang:
Code:
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You are awoken by the chimes of a grandfather clock.</Entry>
</CATEGORY>

<CATEGORY Name="CustomStory">
<Entry Name="Barrier">I should investigate my father's room before heading downstairs</Entry>
</CATEGORY>

<CATEGORY Name="Death">
<Entry Name="StairScare">Wardrobes make good hiding places.</Entry>
</CATEGORY>
</LANGUAGE>

Script:
Code:
void OnStart() {
    if(ScriptDebugOn()) {
        GiveItemFromFile("lantern", "lantern.ent");
        for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
    }
    AddEntityCollideCallback("Player", "EnemyTriggerArea", "EnteredEnemyTriggerArea", true, 1);
    AddEntityCollideCallback("Player", "BlockArea", "EnteredBlockArea", true, 1);
    PlaySoundAtEntity("", "Custom\big_clock_chime.snt", "clock_grandfather_1", 0, false);
    SetDeathHint("Death", "StairScare");
    SetEntityCallbackFunc("key_1", "OnPickup");
}

void OnEnter() {
}

void OnLeave() {
}

void EnteredEnemyTriggerArea(string &in asParent, string &in asChild, int alState) {
    SetEntityActive("servant_grunt", true);
    ShowEnemyPlayerPosition("servant_grunt");
}

void EnteredBlockArea(string &in asParent, string &in asChild, int alState) {
    SetMessage("CustomStory", "Barrier", 6);
}

void OnPickup(string &in asEntity, string &in type) {
    SetEntityActive("invisWall", false);
    SetEntityActive("blockArea", false);
}




RE: message help - Statyk - 01-01-2012

Make sure there isn't a typo on the script area of the collide. or any typos concerning the function.


RE: message help - eagledude4 - 01-01-2012

I found a problem, the name of the area had a lowercase b, but even after I changed it, the issue is still occurring. I've looked over the script, the editor, and the lang file, but the message still does not display when I enter the area.


Code:
AddEntityCollideCallback("Player", "BlockArea", "EnteredBlockArea", true, 1);
Code:
void EnteredBlockArea(string &in asParent, string &in asChild, int alState) {
    SetMessage("CustomStory", "Barrier", 6);
}
Code:
<CATEGORY Name="CustomStory">
    <Entry Name="Barrier">I should investigate my father's room before heading downstairs.</Entry>
</CATEGORY>



RE: message help - Statyk - 01-01-2012

My only guess is to make sure there is no typo in the level editor, such as the "BlockArea"... Also make sure it is ACTIVE.


RE: message help - eagledude4 - 01-02-2012

(01-01-2012, 09:07 PM)Statyk Wrote: My only guess is to make sure there is no typo in the level editor, such as the "BlockArea"... Also make sure it is ACTIVE.
It is active, and I've gone over the names countless times and can't see any typos.

As of now, everything looks like:

Code:
AddEntityCollideCallback("Player", "BlockArea", "EnteredBlockArea", true, 1);

Code:
void EnteredBlockArea(string &in asParent, string &in asChild, int alState) {
    if (HasItem("key_1") == true)
        SetMessage("CustomStory", "Barrier", 6);
    }
}

Code:
<CATEGORY Name="CustomStory">
    <Entry Name="Barrier">I should investigate my father's room before heading downstairs.</Entry>
    </CATEGORY>