Frictional Games Forum (read-only)

Full Version: Adding mementos to locked doors?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I want to add a memento to a locked door and I looked for it on the wiki and found this:

http://wiki.frictionalgames.com/hpl2/tut...cked_doors


I tried to do the same thing but instead of a message I tried to make a memento "pop-up" and it does not work (surprisingly!). How should I do to make it work?
(11-04-2012, 07:36 PM)Tigerwaw Wrote: [ -> ]I want to add a memento to a locked door and I looked for it on the wiki and found this:

http://wiki.frictionalgames.com/hpl2/tut...cked_doors


I tried to do the same thing but instead of a message I tried to make a memento "pop-up" and it does not work (surprisingly!). How should I do to make it work?
did you create a lang file?
So, the whole script would look like this:
void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
{

AddQuest(string& asName, string& asNameAndTextEntry);

}
}
(11-04-2012, 07:40 PM)ZodiaC Wrote: [ -> ]did you create a lang file?
Yes, of course

(11-04-2012, 07:44 PM)The chaser Wrote: [ -> ]So, the whole script would look like this:
void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
{

AddQuest(string& asName, string& asNameAndTextEntry);

}
What am I supposed to write into the .lang file and where should I write the name for the memento that is in the .lang file?
(11-04-2012, 07:54 PM)Tigerwaw Wrote: [ -> ]
(11-04-2012, 07:40 PM)ZodiaC Wrote: [ -> ]did you create a lang file?
Yes, of course

(11-04-2012, 07:44 PM)The chaser Wrote: [ -> ]So, the whole script would look like this:
void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
{

AddQuest(string& asName, string& asNameAndTextEntry);

}
What am I supposed to write into the .lang file and where should I write the name for the memento that is in the .lang file?
<Entry Name="Quest_MyQuest_Text">TEXT HERE</Entry>
Must be in .lang category Journal
And the script would like this: AddQuest("myquest", "MyQuest");
To complete a Momento(aka. quest) you just script this: CompleteQuest("myquest", "MyQuest");
So basicly the same but instead of 'Add' just type in 'Complete'.
Hope it helps.
(11-04-2012, 11:18 PM)ZeroPie Wrote: [ -> ]
(11-04-2012, 07:54 PM)Tigerwaw Wrote: [ -> ]
(11-04-2012, 07:40 PM)ZodiaC Wrote: [ -> ]did you create a lang file?
Yes, of course

(11-04-2012, 07:44 PM)The chaser Wrote: [ -> ]So, the whole script would look like this:
void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
{

AddQuest(string& asName, string& asNameAndTextEntry);

}
What am I supposed to write into the .lang file and where should I write the name for the memento that is in the .lang file?
TEXT HERE
Must be in .lang category Journal
And the script would like this: AddQuest("myquest", "MyQuest");
To complete a Momento(aka. quest) you just script this: CompleteQuest("myquest", "MyQuest");
So basicly the same but instead of 'Add' just type in 'Complete'.
Hope it helps.


Ok thanks. Does it have to have a 'completeQuest'-thing or is it only if you want the player to regain sanity(the blue screen and calm music playing)?

AddQuest("myquest", "MyQuest");

What should I put instead of the 'MyQuest' and 'myquest'?


Is this right?

.hps:

If(GetSwingDoorLocked("BlockedDoor") == true)
{
AddQuest("myquest", "BlockedDoorQuest");
}

.lang:

<CATEGORY Name="Journal">
<Entry Name="Quest_BlockedDoorQuest_Text">Text that you're not allowed to see</Entry>
</LANGUAGE>
(11-04-2012, 11:19 PM)Tigerwaw Wrote: [ -> ]
(11-04-2012, 11:18 PM)ZeroPie Wrote: [ -> ]
(11-04-2012, 07:54 PM)Tigerwaw Wrote: [ -> ]
(11-04-2012, 07:40 PM)ZodiaC Wrote: [ -> ]did you create a lang file?
Yes, of course

(11-04-2012, 07:44 PM)The chaser Wrote: [ -> ]So, the whole script would look like this:
void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
{

AddQuest(string& asName, string& asNameAndTextEntry);

}
What am I supposed to write into the .lang file and where should I write the name for the memento that is in the .lang file?
TEXT HERE
Must be in .lang category Journal
And the script would like this: AddQuest("myquest", "MyQuest");
To complete a Momento(aka. quest) you just script this: CompleteQuest("myquest", "MyQuest");
So basicly the same but instead of 'Add' just type in 'Complete'.
Hope it helps.


Ok thanks. Does it have to have a 'completeQuest'-thing or is it only if you want the player to regain sanity(the blue screen and calm music playing)?

AddQuest("myquest", "MyQuest");

What should I put instead of the 'MyQuest' and 'myquest'?


Is this right?

.hps:

If(GetSwingDoorLocked("BlockedDoor") == true)
{
AddQuest("myquest", "BlockedDoorQuest");
}

.lang:



Text that you're not allowed to see >[Image: smile.gif]

The CompleteQuest script is just to remove the momento from the player's journal, but it can be combined with sanity scripts too.
But the CompleteQuest script is not required, but if it's not used the momento will be there the whole Custom Story.
And the one with the lowercase letters 'myquest' can be anything but I recommend using the same as the one with uppercase letters. (And just so you know it doesn't need to be uppercase/lowercase, but I do like so.)
So you can change the AddQuest to: AddQuest("blockeddoorquest", "BlockedDoorQuest");
Try that out and tell us if it works.
I've tried with this script:

.hps:

if(GetSwingDoorLocked("BlockedDoor") == true)
{
AddQuest("BlockedDoorQuest", "BlockedDoorQuest");
}

Void OnLeave()
{
CompleteQuest("BlockedDoorQuest", "BlockedDoorQuest");
}


.lang:

<CATEGORY Name="Journal">
<Entry Name="Quest_BlockedDoorQuest_Text">The door seems to be blocked from the inside. You need to find another way in.</Entry>
</CATEGORY>


It still gives me an error that says that there's something wrong with the .hps :c
Maybe it's not in that script, but rather somewhere where you mistakely deleted something, or added something. Check where the game says the problem is. It is described with line-numbers

fx: (Linenumber, Letternumber)
(95, 35)

Also tell us. What does the error say?
Unexpected end of file?
Unexpected ...?
(11-05-2012, 12:58 PM)beecake Wrote: [ -> ]Maybe it's not in that script, but rather somewhere where you mistakely deleted something, or added something. Check where the game says the problem is. It is described with line-numbers

fx: (Linenumber, Letternumber)
(95, 35)

Also tell us. What does the error say?
Unexpected end of file?
Unexpected ...?
It says:

Spoiler below!

FATAL ERROR: Could not load script file
'custom_stories/MyCs/maps/MapName.hps'!
main (16, 2) : ERR : Unexpected end of file

Pages: 1 2 3