04-17-2012, 04:09 PM
Helllow
I'm Starting to make a Custom Story and I already got a couple of scripts in my HPS file.
But i realy want to add some music to a certain area.
I watched a couple of tutorials and every one was the same so i copied everything what the scripter of the video did.
I got everything the same as him.But when i start my custom story i get this error
I update the script a little here it is..
void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i< 10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
PlaySoundAtEntity("", "break_glass_bottle.snt", "Player", 0, false);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeOut(0);
FadeIn(3);
AddTimer("T1", 3, "Intro");
AddTimer("T2", 6, "Intro");
AddTimer("T3", 8, "Intro");
AddTimer("T4", 10, "Intro");
AddTimer("T5", 12, "Intro");
AddEntityCollideCallback("player", "musci_1", "StartMusic", "true", 1);
AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1);
AddUseItemCallback("", "crowbar_1", "mansion_1", "UsedCrowbarOnDoor", true);
AddCombineCallback("Player", "Music1", "StartMusic", "true", "0)";
}
void StartMusic(string &in asParent, string &in asChild, int alState)
{
PlayMusic(01_paper_self, "true", "5", "0", "0", "true");
}
void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
BUT NOW I GET THIS ERROR
I'm Starting to make a Custom Story and I already got a couple of scripts in my HPS file.
But i realy want to add some music to a certain area.
I watched a couple of tutorials and every one was the same so i copied everything what the scripter of the video did.
I got everything the same as him.But when i start my custom story i get this error
I update the script a little here it is..
void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i< 10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
PlaySoundAtEntity("", "break_glass_bottle.snt", "Player", 0, false);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeOut(0);
FadeIn(3);
AddTimer("T1", 3, "Intro");
AddTimer("T2", 6, "Intro");
AddTimer("T3", 8, "Intro");
AddTimer("T4", 10, "Intro");
AddTimer("T5", 12, "Intro");
AddEntityCollideCallback("player", "musci_1", "StartMusic", "true", 1);
AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1);
AddUseItemCallback("", "crowbar_1", "mansion_1", "UsedCrowbarOnDoor", true);
AddCombineCallback("Player", "Music1", "StartMusic", "true", "0)";
}
void StartMusic(string &in asParent, string &in asChild, int alState)
{
PlayMusic(01_paper_self, "true", "5", "0", "0", "true");
}
void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
BUT NOW I GET THIS ERROR