Frictional Games Forum (read-only)
Create a Partical System when interact - 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: Create a Partical System when interact (/thread-13614.html)



Create a Partical System when interact - jessehmusic - 02-26-2012

Hello all amnesia fans!

I been trying a while to get a collide when you enter an area its is like some one hit the door , but i can't get it to work, I have found the "snt" but the vulom is to low Sad and can't get the partical system to work Sad

Here is my hps

void OnStart()
{
AddUseItemCallback("", "The Lost Key", "Lockeddoor_1", "KeyOnDoor", true);
AddUseItemCallback("", "Key", "ptest_cellar_wood01_4", "KeyOnDoor1", true);
AddEntityCollideCallback("Player", "MusicStart", "Music", true, 1);
AddEntityCollideCallback("Player", "DoorSlam", "DoorSlam", true, 1); //THIS IS THE DOOR
SetEntityPlayerInteractCallback("Note_Test1", "Sound", true);
}
void Sound(string &in asEntity)
{
PlaySoundAtEntity("", "15_prisoner_scream.snt", "Player", 0.0f, false);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Lockeddoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Lockeddoor_1", 0, false);
RemoveItem("The Lost Key");
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("ptest_cellar_wood01_4", false, true);
PlaySoundAtEntity("", "unlock_door", "ptest_cellar_wood01_4", 0, false);
RemoveItem("Key");
}

void DoorSlam(string &in asParent, string &in asChild, int alState)
{
CreateParticleSystemAtEntity("", "sp_hit_wood.ps", "ptest_cellar_wood01_2", true); // THIS IS THE DOOR
PlaySoundAtEntity("", "hit_wood.snt", "Player", 0.0f, false);
}
void Music(string &in asParent, string &in asChild, int alState)
{
PlayMusic("01_amb_darkness.ogg", true, 0.8f, 1, 0, true);
}

void OnEnter()

{

}

void OnLeave()

{

}