Frictional Games Forum (read-only)

Full Version: Horror Event Wont work...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello my event with scare wont work dont know why any clue hps-->


void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
}
void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}
void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Horror_Barrel", false);
PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
}

void Music1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}
It'd be cool to know what your problem is, instead of us guessing. And with the majority of your posts asking for help I thought you would know this -_-
(04-04-2012, 09:16 AM)jessehmusic Wrote: [ -> ]PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
I see the problem. Use another sample than "24_iron_maiden.ogg", or players will groan and be pissed at you. Tongue
The script dosnt call....
FYI - OnStart () and OnEnter () are the same. You have two of them. Try this:

PS: I HIGHLY suggest removing the over played jumpscare you have in here...

void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
}

void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}

void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Horror_Barrel", false);
PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
}

void Music1(string &in asParent, string &in asChild, int alState)

{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}
(04-04-2012, 03:37 PM)JetlinerX Wrote: [ -> ]FYI - OnStart () and OnEnter () are the same. You have two of them. Try this:

PS: I HIGHLY suggest removing the over played jumpscare you have in here...

void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
}

void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}

void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Horror_Barrel", false);
PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
}

void Music1(string &in asParent, string &in asChild, int alState)

{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}
Dosnt work :/ Still same prob


Map has the same name as the script, yes?

Example:

Map01.map
and
Map01.hps
(04-04-2012, 03:43 PM)JetlinerX Wrote: [ -> ]Map has the same name as the script, yes?

Example:

Map01.map
and
Map01.hps
yes ofc , the Hallow Needle Addusecallback work


Have you checked the names of your script areas in the level editor? Also, have you added any Debug messages to check the execution of your scripts?
(04-04-2012, 03:50 PM)JetlinerX Wrote: [ -> ]Have you checked the names of your script areas in the level editor? Also, have you added any Debug messages to check the execution of your scripts?
yes....
Pages: 1 2 3