+- 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: [SCRIPT] I would very much like some help please! (/thread-24914.html)
void Open_Door(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("door1", false, true); SetSwingDoorDisableAutoClose("door1", true); // Disable autoclose means its not gonna close by it self. AddTimer("", 0.5, "Door_Effect"); // Leading to functions in Door_Effect script. }
void Door_Effect (string &in asTimer) { CreateParticleSystemAtEntity("", "ps_dust_whirl", "AreaOpenEffect", false); // Makes a patricle system at the scriptbox AreaOpenEffect. PlaySoundAtEntity("AreaOpenEffect", "scare_wind.snt", "Player", 1, true); // Plays a sound at the scriptbox named AreaOpenEffect. AddPropForce("door1", 0, 0, 5000, "world"); // Gives the door a push so it goes open. AddTimer("", 0.5, "Door_Scare"); // For adding more effect like Sound/Sanity Damage. }
void Door_Scare(string &in asTimer) { PlaySoundAtEntity("scare", "react_scare.snt", "Player", 1, true); // For better scare effect. GiveSanityDamage(25, true); // Your screen goes a bit forward to scare you more. }
void Open_Door(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("door1", false, true); SetSwingDoorDisableAutoClose("door1", true); // Disable autoclose means its not gonna close by it self. AddTimer("", 0.5, "Door_Effect"); // Leading to functions in Door_Effect script. }
void Door_Effect (string &in asTimer) { CreateParticleSystemAtEntity("", "ps_dust_whirl", "AreaOpenEffect", false); // Makes a patricle system at the scriptbox AreaOpenEffect. PlaySoundAtEntity("AreaOpenEffect", "scare_wind.snt", "Player", 1, true); // Plays a sound at the scriptbox named AreaOpenEffect. AddPropForce("door1", 0, 0, 5000, "world"); // Gives the door a push so it goes open. AddTimer("", 0.5, "Door_Scare"); // For adding more effect like Sound/Sanity Damage. }
void Door_Scare(string &in asTimer) { PlaySoundAtEntity("scare", "react_scare.snt", "Player", 1, true); // For better scare effect. GiveSanityDamage(25, true); // Your screen goes a bit forward to scare you more. }
RE: Wtf ??? Never srsly never see this!!!! (this thread make me MAD) - Radical Batz - 03-23-2014
Straxedix Let me tell you somethin, I'm not trying to be mean but You are never going to learn if you keep taking scripts and asking people to do everything for you! Take a look at the wiki or engine scripts so you can improve more. But it's ok if you're a begginer, I was like you before until I got more fluently into coding
RE: Wtf ??? Never srsly never see this!!!! (this thread make me MAD) - Neelke - 03-23-2014
Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects.
afX - amount along the X-axis
afY - amount along the Y-axis
afZ - amount along the Z-axis
abUseLocalCoords - If true, axes are based on where the player is facing, not the world.
Test with this, text below explains what it does. Enuff said.