Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved message help
Author Message
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #1
message help
Solved.

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-13-2012 05:15 AM by eagledude4.)
01-01-2012 02:25 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #2
RE: message help
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);

(This post was last modified: 01-01-2012 02:37 AM by flamez3.)
01-01-2012 02:36 AM
Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #3
RE: message help
I figured that out before you posted, please read the first post again. The category name doesn't have to be "Messages" does it?

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-01-2012 02:49 AM by eagledude4.)
01-01-2012 02:48 AM
Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #4
RE: message help
Help?

Its hard to see the truth when you've been blinded by lies.
01-01-2012 07:08 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 3,600
Joined: Sep 2011
Reputation: 198
Post: #5
RE: message help
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>

01-01-2012 08:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #6
RE: message help
Thanks, I didn't know it worked like that, but the message still isn't showing.

Lang:
<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:
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);
}

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-01-2012 08:41 PM by eagledude4.)
01-01-2012 08:26 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 3,600
Joined: Sep 2011
Reputation: 198
Post: #7
RE: message help
Make sure there isn't a typo on the script area of the collide. or any typos concerning the function.

01-01-2012 08:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #8
RE: message help
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.


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

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-01-2012 08:47 PM by eagledude4.)
01-01-2012 08:44 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 3,600
Joined: Sep 2011
Reputation: 198
Post: #9
RE: message help
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.

01-01-2012 09:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
eagledude4 Offline
Member

Posts: 144
Joined: Dec 2011
Reputation: 0
Post: #10
RE: message help
(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:

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

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

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

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-02-2012 02:33 AM by eagledude4.)
01-02-2012 02:24 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)