05-20-2012, 07:12 AM
Hi guys, I've been working on a costum story for like already a week, but I can't get this script working...
I've been watching 4 youtubers, but I just can't seem to get it working..
Could someone please help?
My .HPS file :
void OnStart()
{
AddUseItemCallback("", "Keyone", "doorone", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Keytwo", "doortwo", "UsedKeyOnDooor", true);
SetEntityPlayerInteractCallback("lantern", "ActivateMonster", true);
AddUseItemCallback("", "knifeone", doorthree", "buyone", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doorone", false, true);
PlaySoundAtEntity("", "unlock_door", "doorone", 0, false);
RemoveItem("Keyone");
}
void UsedKeyOnDooor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doortwo", false, true);
PlaySoundAtEntity("", "unlock_door", "doortwo", 0, false);
RemoveItem("Keytwo");
}
void ActivateMonster(string &in item)
{
SetEntityActive("enemyone", true);
}
void buyone(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doorthree", false, true);
PlaySoundAtEntity("", "unlock_door", "doorthree", 0, false);
RemoveItem("knifeone");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
my custom_story_settings.cfg
Name = "StoryOfAPhantom"
Author = "FaintedPhantom"
Imgfile = "Image.JPG"
Startmap = "Eigenmap.MAP"
Startpos = "PlayerStartArea_1"
/>
The custom story won't show up..
Yesterday it still did, but then it gave me an error, about FATAL ERROR: something something (47,2)
or something..
Thanx already
I've been watching 4 youtubers, but I just can't seem to get it working..
Could someone please help?
My .HPS file :
void OnStart()
{
AddUseItemCallback("", "Keyone", "doorone", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Keytwo", "doortwo", "UsedKeyOnDooor", true);
SetEntityPlayerInteractCallback("lantern", "ActivateMonster", true);
AddUseItemCallback("", "knifeone", doorthree", "buyone", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doorone", false, true);
PlaySoundAtEntity("", "unlock_door", "doorone", 0, false);
RemoveItem("Keyone");
}
void UsedKeyOnDooor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doortwo", false, true);
PlaySoundAtEntity("", "unlock_door", "doortwo", 0, false);
RemoveItem("Keytwo");
}
void ActivateMonster(string &in item)
{
SetEntityActive("enemyone", true);
}
void buyone(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("doorthree", false, true);
PlaySoundAtEntity("", "unlock_door", "doorthree", 0, false);
RemoveItem("knifeone");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
my custom_story_settings.cfg
Name = "StoryOfAPhantom"
Author = "FaintedPhantom"
Imgfile = "Image.JPG"
Startmap = "Eigenmap.MAP"
Startpos = "PlayerStartArea_1"
/>
The custom story won't show up..
Yesterday it still did, but then it gave me an error, about FATAL ERROR: something something (47,2)
or something..
Thanx already