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
Script Help Memento won't show up
elbichopt Offline
Junior Member

Posts: 14
Threads: 2
Joined: Aug 2012
Reputation: 0
#1
Memento won't show up

When I walk to the area, it shows that a memento has been wrote but when I go check it it only says: "-" lol

Screenshots:

Spoiler below!
[Image: amnesia2012100822481582.png]

Spoiler below!
[Image: amnesia2012100822481985.png]

Spoiler below!
[Image: 66824296.jpg]


The codes:

Lang file:
Spoiler below!
<LANGUAGE>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">This is where I test my maps.</Entry>
    </CATEGORY>
    
    <CATEGORY Name ="Inventory">
            <Entry Name="ItemDesc_stone_hammer_1">This might just break the padlock!</Entry>
            <Entry Name="ItemName_stone_hammer_1">Stone hammer</Entry>
    </CATEGORY>
    
    <CATEGORY Name ="Journal">
            <Entry Name="Quest_RockPadlock_Text">The padlock looks rusty enough to be easily broken.</Entry>
    </CATEGORY>


.HPS file:
Spoiler below!
void OnStart()
{
SetPlayerLampOil(0);
AddEntityCollideCallback("Player", "rockpadlock", "GetRockPadlockQuest", true, 1);
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddUseItemCallback("OpenDoor","stone_hammer_1", "padlock_1", "unlock_prison_section_1", true);
}

void GetRockPadlockQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest ("rockpadlock", "RockPadlock");
}

void unlock_prison_section_1(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_1", 0.0f);
SetEntityActive("padlock_broken_1", true);
RemoveItem("stone_hammer_1");
SetEntityActive("padlock_1", false);
PlaySoundAtEntity("", "break_wood_metal.snt", "ScriptArea_1", 0, false);
CompleteQuest("rockpadlock", "rockpadlock");
}

void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("tochalol", false, true);
SetLampLit("tochalol2", false, true);
AddTimer("", 2, "Out2");
PlaySoundAtEntity("", "00_faint.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(9.0f, true);
}


Help? Huh
10-08-2012, 10:57 PM
Find
4WalledKid Offline
Member

Posts: 107
Threads: 23
Joined: Oct 2012
Reputation: 1
#2
RE: Memento won't show up

Try removing capital letters on the Quest_RockPadlock_Text in the .lang file. Why? because you didn't use capital letters in the .hps! Tell me if it worked Smile

[Image: 4walledkidbanner_zps1514b7f6.png]
(This post was last modified: 10-08-2012, 11:02 PM by 4WalledKid.)
10-08-2012, 11:01 PM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: Memento won't show up

<LANGUAGE>

    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">This is where I test my maps.</Entry>
    </CATEGORY>

    <CATEGORY Name="Inventory">
            <Entry Name="ItemDesc_stone_hammer_1">This might just break the padlock!</Entry>
            <Entry Name="ItemName_stone_hammer_1">Stone hammer</Entry>
    </CATEGORY>

    <CATEGORY Name="Journal">
<Entry Name="Quest_RockPadlock_Name">padlock quest</Entry>
            <Entry Name="Quest_RockPadlock_Text">The padlock looks rusty enough to be easily broken.</Entry>
    </CATEGORY>

I removed the spaces in "<CATEGORY Name = "blah">". Try replacing yours with mine. Also added a quest name.
(This post was last modified: 10-08-2012, 11:14 PM by Statyk.)
10-08-2012, 11:13 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: Memento won't show up

It must be a .lang problem, the script adds a memento correctly. THere should be something from there that escapes from my sight.

Ok: You have it wrong. Here's the structure of the script:
AddQuest(string& asName, string& asNameAndTextEntry);


And here is what you have:

("rockpadlock", "RockPadlock");

So, you should change it to this:
void GetRockPadlockQuest(string &in asParent, string &in asChild, int alState)

{

AddQuest ("RockPadlock", "Journal");

}

<Entry Name="Quest_RockPadlock_Text">The padlock looks rusty enough to be easily broken.</Entry>

This may work.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 10-09-2012, 06:47 AM by The chaser.)
10-09-2012, 06:42 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#5
RE: Memento won't show up

If you're starting your map in dev_mode, the .lang file won't load. You can't read notes, mementos etc..
Try to start it the classic way, via main menu.

[Image: 18694.png]
10-09-2012, 06:51 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: Memento won't show up

One thing I feel is being overlooked is that there is no /Language at the end of the file; if that truly is the case and not just an error copy/pasting it into the page, then try this:

Spoiler below!


<LANGUAGE>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">This is where I test my maps.</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_stone_hammer_1">Stone Hammer</Entry>
<Entry Name="ItemDesc_stone_hammer_1">This might just break the padlock!</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_RockPadlock_Text">The padlock looks rusty enough to be easily broken.</Entry>
</CATEGORY>

</LANGUAGE>

The lang file is fine aside from that; any further error can be attributed to mismatched names in the .hps file.

Hope that helped...

I rate it 3 memes.
10-09-2012, 06:52 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: Memento won't show up

The only thing wrong with the LANG file is that it lacks a closing tag for LANGUAGE. As for the script, the use of AddQuest is correct. If the user was playing in developer mode, they should consider testing the story with a non-developer profile.

Meh? Ninja'd twice?

Tutorials: From Noob to Pro
(This post was last modified: 10-09-2012, 06:54 AM by Your Computer.)
10-09-2012, 06:53 AM
Website Find
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#8
RE: Memento won't show up

You should definitely use this to edit your language file with
http://www.frictionalgames.com/forum/thread-12213.html

It saved me constantly from spelling errors and will make your more comfortable making notes Smile

[Image: 15isy6C]
10-09-2012, 11:32 AM
Find
elbichopt Offline
Junior Member

Posts: 14
Threads: 2
Joined: Aug 2012
Reputation: 0
#9
RE: Memento won't show up

(10-09-2012, 06:52 AM)andyrockin123 Wrote: One thing I feel is being overlooked is that there is no /Language at the end of the file; if that truly is the case and not just an error copy/pasting it into the page, then try this:

Spoiler below!


<LANGUAGE>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">This is where I test my maps.</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_stone_hammer_1">Stone Hammer</Entry>
<Entry Name="ItemDesc_stone_hammer_1">This might just break the padlock!</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_RockPadlock_Text">The padlock looks rusty enough to be easily broken.</Entry>
</CATEGORY>

</LANGUAGE>

The lang file is fine aside from that; any further error can be attributed to mismatched names in the .hps file.

Hope that helped...
That worked just perfectly! Thank you!
Spoiler below!
[Image: amnesia2012100912585412.png]
And thank you all for donating your time to help my problem! Blush Big Grin
10-09-2012, 01:01 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#10
RE: Memento won't show up

(10-09-2012, 06:53 AM)Your Computer Wrote: Meh? Ninja'd twice?
Did you install the latest Human Patch? Big Grin

I rate it 3 memes.
(This post was last modified: 10-09-2012, 04:50 PM by Adny.)
10-09-2012, 04:50 PM
Find




Users browsing this thread: 1 Guest(s)