Frictional Games Forum (read-only)

Full Version: How to "Make message appear when interacting object" (SOLVED)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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);
    }
(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
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
CHECK your code D:<
You're missing a </Entry>.
(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!