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
[SOLVED]Memento dont work
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#1
[SOLVED]Memento dont work

I created an area that give's the player a memento. but when the player looks up the memento there is no text.

Script:
Quote:AddEntityCollideCallback("Player", "padlock", "padlockquest", true, 1);

void padlockquest(string &in asParent, string &in asChild, int alState)
{
AddQuest ("padlockdoor", "Journal");
}
.lang:
Quote:<Entry Name="Quest_padlockdoor_Name">Padlock.</Entry>
<Entry Name="Quest_padlockdoor_Text">There is a padlock that prevents me from opening the door, i should find something to break it with.</Entry>

I have no idea whats missing. i checked so the entry name and text is under the journal category
(This post was last modified: 05-25-2014, 04:04 PM by Rowzter.)
05-25-2014, 01:57 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#2
RE: Memento dont work

(05-25-2014, 01:57 PM)Rowzter Wrote: I created an area that give's the player a memento. but when the player looks up the memento there is no text.

Script:
Quote:AddEntityCollideCallback("Player", "padlock", "padlockquest", true, 1);

void padlockquest(string &in asParent, string &in asChild, int alState)
{
AddQuest ("padlockdoor", "Journal");
}
.lang:
Quote:<Entry Name="Quest_padlockdoor_Name">Padlock.</Entry>
<Entry Name="Quest_padlockdoor_Text">There is a padlock that prevents me from opening the door, i should find something to break it with.</Entry>

I have no idea whats missing. i checked so the entry name and text is under the journal category


Make sure your area has the right name? and is that your whole lang file?
remember to always put this at the end of the journal entry </CATEGORY> and I hope you have this
</LANGUAGE> at the end of your lang file

If you already made all of that and still doesn't work then Idk what's the prob :/

(This post was last modified: 05-25-2014, 02:07 PM by Radical Batz.)
05-25-2014, 02:04 PM
Find
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#3
RE: Memento dont work

(05-25-2014, 02:04 PM)Badcat5550 Wrote:
(05-25-2014, 01:57 PM)Rowzter Wrote: I created an area that give's the player a memento. but when the player looks up the memento there is no text.

Script:
Quote:AddEntityCollideCallback("Player", "padlock", "padlockquest", true, 1);

void padlockquest(string &in asParent, string &in asChild, int alState)
{
AddQuest ("padlockdoor", "Journal");
}
.lang:
Quote:<Entry Name="Quest_padlockdoor_Name">Padlock.</Entry>
<Entry Name="Quest_padlockdoor_Text">There is a padlock that prevents me from opening the door, i should find something to break it with.</Entry>

I have no idea whats missing. i checked so the entry name and text is under the journal category


Make sure your area has the right name? and is that your whole lang file?
remember to always put this at the end of the journal entry </CATEGORY> and I hope you have this
</LANGUAGE> at the end of your lang file

If you already made all of that and still doesn't work then Idk what's the prob :/

The area must be correct because i get the memento in my journal but there is no text. and i check so there is both the Category end and language end
(This post was last modified: 05-25-2014, 02:10 PM by Rowzter.)
05-25-2014, 02:09 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#4
RE: Memento dont work

The area must be correct because i get the memento in my journal but there is no text.
[/quote]

Probably something wrong with your lang file then. as I said
remember to always put this at the end of every category </CATEGORY> and I hope you have this
</LANGUAGE> at the end of your lang file

(This post was last modified: 05-25-2014, 02:12 PM by Radical Batz.)
05-25-2014, 02:09 PM
Find
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#5
RE: Memento dont work

(05-25-2014, 02:09 PM)Badcat5550 Wrote: The area must be correct because i get the memento in my journal but there is no text.

Probably something wrong with your lang file then. as I said
remember to always put this at the end of every category </CATEGORY> and I hope you have this
</LANGUAGE> at the end of your lang file
[/quote]

my full lang:
<LANGUAGE>

<CATEGORY Name="CustomStoryMain">
      <Entry Name="Description">
         This is just a test.
      </Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
    <Entry Name="ItemDesc_cellarkey">A Key made of Iron</Entry>
    <Entry Name="ItemName_cellarkey">Basement Key</Entry>
    <Entry Name="ItemDesc_librarykey">A Key made of Iron</Entry>
    <Entry Name="ItemName_librarykey">Library Key</Entry>
    <Entry Name="ItemDesc_toolkey">A old key made of Iron</Entry>
    <Entry Name="ItemName_toolkey">Old Key</Entry>
    <Entry Name="ItemDesc_cellarcrowbar">Hopefully this holds for one last job</Entry>
    <Entry Name="ItemName_cellarcrowbar">Crowbar</Entry>
    <Entry Name="ItemDesc_picklock">A small needle</Entry>
    <Entry Name="ItemName_picklock">Needle</Entry>
    <Entry Name="ItemDesc_cellkey">It says Cellblock C</Entry>
    <Entry Name="ItemName_cellkey">Old Key</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
    <Entry Name="Note_firstletter_1_Name">Hello Proxiuz</Entry>
    <Entry Name="Note_firstletter_1_Text">Hoppas du gillar denna "Demo"</Entry>
    <Entry Name="Note_report_Name">To Geoff</Entry>
    <Entry Name="Note_report_Text">Hello Geoff, If you need the key to Cellblock C then you can find it in the desk in my office.[br][br] Steve</Entry>
    <Entry Name="Quest_padlockdoor_Name">Padlock.</Entry>
    <Entry Name="Quest_padlockdoor_Text">There is a padlock that prevents me from opening the door, i should find something to break it with.</Entry>
</CATEGORY>

<CATEGORY Name="Levels">
    <Entry Name="Dungeon">Dungeon</Entry>
    <Entry Name="cellardoor">Cellar</Entry>
    <Entry Name="castledungeon">Dungeon</Entry>
    <Entry Name="castleleft">Great Hall</Entry>
</CATEGORY>

<CATEGORY Name="Signs">
    <Entry Name="Sign1">Dungeon Kitchen</Entry>
    <Entry Name="cella">Cell Area A</Entry>
    <Entry Name="cellb">Cell Area B</Entry>
    <Entry Name="cellc">Cell Area C</Entry>
    <Entry Name="winesign">Winecellar</Entry>
    <Entry Name="office">Steve's Office</Entry>
</CATEGORY>

<CATEGORY Name="Messages">
    <Entry Name="Popup1">RUN!</Entry>
</CATEGORY>

</LANGUAGE>
05-25-2014, 02:14 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#6
RE: Memento dont work

Try this

void padlockquest(string &in asParent, string &in asChild, int alState)
{
AddQuest ("YOUR AREA NAME", "padlockdoor");
}

because I think I found the problem!

If that works then why not give me a rating if you want.

(This post was last modified: 05-25-2014, 02:23 PM by Radical Batz.)
05-25-2014, 02:22 PM
Find
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#7
RE: Memento dont work

(05-25-2014, 02:22 PM)Badcat5550 Wrote: Try this

void padlockquest(string &in asParent, string &in asChild, int alState)
{
AddQuest ("YOUR AREA NAME", "padlockdoor");
}

because I think I found the problem!

If that works then why not give me a rating if you want.

Yay! that worked =D. Let's give ratings!

Meanwhile i got ur attention. how to u make a key unlock a leveldoor that is in another level/map
05-25-2014, 02:48 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Memento dont work

Does any other text in your story appear? For example the menu description? If not, something's causing the lang to not load, but if it does, the problem lies with the memento itself.

You know mementos don't use names, just text? You can cut out that _Name one. A memento looks like this:

PHP Code: (Select All)
    <CATEGORY Name="Journal">
        <
Entry Name="Quest_Quest1_Text">Perhaps I should go the other way.</Entry>
    </
CATEGORY

Oh, and the AddQuest script does not work like that. The problem must be that you put "Journal" in your quotes. The category is hard-coded, so you never define it anywhere. Put padlockdoor in both strings. First string is the reference name of the quest, the second is the entry in the lang.

Edit: Looks like you figured it out, but oh well. There's an explanation at least.

To make a key unlock a level door, you must use the SetLevelDoorLocked("DoorName", false); in the level.hps you want it to happen in. As long as the key name matches, it can be used in any level.

(This post was last modified: 05-25-2014, 02:55 PM by Mudbill.)
05-25-2014, 02:51 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#9
RE: Memento dont work

Spoiler below!

(05-25-2014, 02:22 PM)Badcat5550 Wrote: Try this

void padlockquest(string &in asParent, string &in asChild, int alState)
{
AddQuest ("YOUR AREA NAME", "padlockdoor");
}

because I think I found the problem!

If that works then why not give me a rating if you want.

(03-27-2014, 01:03 AM)Traggey Wrote: Don't EVER.


EVER
<EVER>

Ask for rep.

Thanks.

Just sayin' Tongue


Add this to the .hps file which has the locked Level door in its .map file:
PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""level_door_key_name""level_door_name""unlock_level_door"true);
//Change level_door_key_name and level_door_name to their respective names in the level editor, but keep the quotes ("").
}

void unlock_level_door(string &in asItemstring &in asEntity)
{
SetLevelDoorLocked(asEntityfalse);


Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 05-25-2014, 02:57 PM by Romulator.)
05-25-2014, 02:57 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#10
RE: Memento dont work

Meanwhile i got ur attention. how to u make a key unlock a leveldoor that is in another level/map
[/quote]

It doesn't matter which map it is to unlock a level door, if you get a key from one level and go to another level it will still be the same.

But yeah this is the code to make a key unlock any level door.

AddUseItemCallback("", "NAME OF YOUR KEY", "NAME OF THE LEVEL DOOR YOU WANNA UNLOCK", "LevelDoorunlocked", True);

void LevelDoorUnlocked(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("NAME OF YOUR LEVEL DOOR YOU WANNA UNLOCK", false);
PlaySoundAtEntity("", "unlock_door.ogg", asEntity, 0, false);
RemoveItem(asItem);
    }

Hope that helps. Wink

(This post was last modified: 05-25-2014, 03:01 PM by Radical Batz.)
05-25-2014, 02:58 PM
Find




Users browsing this thread: 3 Guest(s)