10-08-2012, 10:57 PM
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:
The codes:
Lang file:
.HPS file:
Help?
Screenshots:
The codes:
Lang file:
Spoiler below!
Code:
<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!
Code:
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?