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
Error when I add a memento
Coolfromdah00d Offline
Junior Member

Posts: 38
Threads: 5
Joined: Mar 2013
Reputation: 0
#1
Error when I add a memento

I'm trying to make a memento happen when I enter an area, but when I start the level, the description is not showed, none of the notes work and it gives me the error message (it gives me this message after I added the CallbackFunc on AreaMemento). I am not new to coding but I just can't seem to find the error...

Here's my english_lang file

<LANGUAGE>


<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Texthere</Entry>

</CATEGORY>

</CATEGORY Name="Journal">
<Entry Name="Quest_pickuplantern_Text"> This could be useful...</Entry>
<Entry Name="Quest_enterarea_Text"> Where am I...? </Entry>

</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_note01_Name">texthere</Entry>
<Entry Name="Note_note01_Text">texthere </Entry>

</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Note_note02_Name">texthere</Entry>
<Entry Name="Note_note02_Text">texthere.</Entry>

</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemName_GuestRoomKey">texthere</Entry>
<Entry Name="ItemDesc_GuestRoomKey">texthere</Entry>
</CATEGORY>

</LANGUAGE>
(I shortended down my notes as they are very long)

Here is my HPS file
void OnStart()
{
AddUseItemCallback("Player", AreaMemento, "EventQuest", true, 1);

SetEntityCallbackFunc("GuestRoomKey", "jump");
AddUseItemCallback("", "GuestRoomKey", "door01", "UsedKeyOnDoor", false);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void jump(string &in asEntity, string &in type)
{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, true);
StartScreenShake(0.5f, 1, 0, 0.25);
GiveSanityDamage(5.0f, true);
}

void PickUpLantern(string &in asEntity, string &in type)
{
AddQuest("lantern", "pickuplantern");
}

void EventQuest(string& in asParent, string& in asChild, int alState)
{
AddQuest("area", "enterarea");
}

Sorry for my bad english. English is not my mother tounge.

Thank you

I haven't forgotten to name my area "AreaMemento" and neither did I forget to name the lantern "PickUpLantern" in the callbackFunc
(This post was last modified: 02-10-2014, 01:00 PM by Coolfromdah00d.)
02-10-2014, 12:57 PM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#2
RE: Error when I add a memento

Wrong forum, moved to development supprt! :3
02-12-2014, 08:23 AM
Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#3
RE: Error when I add a memento

AddUseItemCallback?

I think you mean:
AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);

AreaMemento should also be quoted.

Also, you don't need to have a new Journal category for each note. One is enough, for all of the Journal .lang entries.

(This post was last modified: 02-12-2014, 09:38 AM by GrAVit.)
02-12-2014, 09:35 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Error when I add a memento

This has already been solved. This is a duplicate thread of this one.

So I guess it should be removed?

02-12-2014, 01:34 PM
Find




Users browsing this thread: 1 Guest(s)