Frictional Games Forum (read-only)
How to "Make message appear when interacting object" (SOLVED) - 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: How to "Make message appear when interacting object" (SOLVED) (/thread-5909.html)



How to "Make message appear when interacting object" (SOLVED) - HumiliatioN - 12-26-2010

Yep how?

I have this example here: with door

<CATEGORY Name ="Message">
<Entry Name="Locked1">It's Locked. I have to find key.</Entry>
</CATEGORY>
</LANGUAGE>

void Locked1 "SetMessage" ("Message", "Locked1", 20.0f);

Why its not working? Sad


RE: How to "Make message appear when interacting object" ANSWER! - ModManDann - 12-27-2010

it doesn't work like that.

You need to go to the level editor and click your door, click the entity tab and find the PlayerInteractCallback field. Write the following in it: LockedDoor .
Now go to your hps file and paste the following code in the bottom of it

Code:
LockedDoor(string &in entity)
    {
        SetMessage("Message", "Locked1", 20.0f);
    }



RE: How to "Make message appear when interacting object" ANSWER! - HumiliatioN - 12-27-2010

(12-27-2010, 02:34 PM)ModManDann Wrote: it doesn't work like that.

You need to go to the level editor and click your door, click the entity tab and find the PlayerInteractCallback field. Write the following in it: LockedDoor .
Now go to your hps file and paste the following code in the bottom of it

Code:
LockedDoor(string &in entity)
    {
        SetMessage("Message", "Locked1", 20.0f);
    }

Not working :/

I have this:

<CATEGORY Name ="Message">
<Entry Name="Locked0">It's Locked. I have to find key.</Entry>
<Entry Name="Locked1">This Office is Locked. Find key.
</CATEGORY>

Level door works Locked0 message...

void LockedDoor(string &in entity)
{
SetMessage("Message", "Locked1", 20.0f);
}


But Locked1 doesnt work Sad


RE: How to "Make message appear when interacting object" ANSWER! - bigfoot - 12-27-2010

I'm not sure but I have had the same problem with my notes and I had to name the note like this "Note_[nameofnote]_Text and Note_[nameofnote]_Name".

So try this "Message_Locked0" and "Message_Locked1"

Goodluck


RE: How to "Make message appear when interacting object" ANSWER! - Frontcannon - 12-27-2010

CHECK your code D:<
You're missing a </Entry>.


RE: How to "Make message appear when interacting object" ANSWER! - HumiliatioN - 12-27-2010

(12-27-2010, 04:45 PM)bigfoot Wrote: I'm not sure but I have had the same problem with my notes and I had to name the note like this "Note_[nameofnote]_Text and Note_[nameofnote]_Name".

So try this "Message_Locked0" and "Message_Locked1"

Goodluck

Nope not working this is weird Sad
(12-27-2010, 04:54 PM)Frontcannon Wrote: CHECK your code D:<
You're missing a </Entry>.

Frontcannon i forgot to add that in this thread i have really that Entry already and i have figured out all functions but no luck :/ Thanks anyways..
(12-27-2010, 04:45 PM)bigfoot Wrote: I'm not sure but I have had the same problem with my notes and I had to name the note like this "Note_[nameofnote]_Text and Note_[nameofnote]_Name".

So try this "Message_Locked0" and "Message_Locked1"

Goodluck

Now i figured it out! Smile

You must name that last word example: My door name is "Office Door"

Write that "Door" in PlayerInteractCallback field..

Then write:

void Door(string &in entity)
{
SetMessage("Message", "Door", 20.0f);
}

lang.file: <Entry Name="Door">It's Locked. Where is that key?</Entry>

Simple as that Smile Thanks for the tips!