Frictional Games Forum (read-only)
Horror Event Wont work... - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Horror Event Wont work... (/thread-14480.html)

Pages: 1 2 3


Horror Event Wont work... - jessehmusic - 04-04-2012

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);
}


RE: Horror Event Wont work... - flamez3 - 04-04-2012

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 -_-


RE: Horror Event Wont work... - Cranky Old Man - 04-04-2012

(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



RE: Horror Event Wont work... - jessehmusic - 04-04-2012

The script dosnt call....


RE: Horror Event Wont work... - JetlinerX - 04-04-2012

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);
}



RE: Horror Event Wont work... - jessehmusic - 04-04-2012

(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





RE: Horror Event Wont work... - JetlinerX - 04-04-2012

Map has the same name as the script, yes?

Example:

Map01.map
and
Map01.hps



RE: Horror Event Wont work... - jessehmusic - 04-04-2012

(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





RE: Horror Event Wont work... - JetlinerX - 04-04-2012

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?



RE: Horror Event Wont work... - jessehmusic - 04-04-2012

(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....