Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to "Make message appear when interacting object" (SOLVED)
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#1
How to "Make message appear when interacting object" (SOLVED)

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

“Life is a game, play it”
(This post was last modified: 12-27-2010, 05:33 PM by HumiliatioN.)
12-26-2010, 11:21 PM
Find
ModManDann Offline
Member

Posts: 61
Threads: 6
Joined: Dec 2010
Reputation: 0
#2
RE: How to "Make message appear when interacting object" ANSWER!

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

LockedDoor(string &in entity)
    {
        SetMessage("Message", "Locked1", 20.0f);
    }
12-27-2010, 02:34 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#3
RE: How to "Make message appear when interacting object" ANSWER!

(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

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

“Life is a game, play it”
12-27-2010, 03:42 PM
Find
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#4
RE: How to "Make message appear when interacting object" ANSWER!

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
12-27-2010, 04:45 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#5
RE: How to "Make message appear when interacting object" ANSWER!

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


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
(This post was last modified: 12-27-2010, 04:54 PM by Frontcannon.)
12-27-2010, 04:54 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#6
RE: How to "Make message appear when interacting object" ANSWER!

(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!

“Life is a game, play it”
(This post was last modified: 12-27-2010, 05:28 PM by HumiliatioN.)
12-27-2010, 05:17 PM
Find




Users browsing this thread: 1 Guest(s)