Ever wanted to throw the player through a doorway, have him collapse, or just want to scare the crap out of your players in general? You've come to the right place! Today I'll show you, in as much detail as possible, how to scare your players without dragging out the brutes/grunts/water monsters.
I once played a custom story where, at totally random times, I(Daniel) would be thrown around the room. (Apologies, I can't remember the name.) This is a great scare!
First make sure you have a little area where you'd like this to happen. For mine, I chose the bottom of a staircase which leads into another open room. It's important to make sure the area the player gets pushed into is a rather open area, unless you'd like the player to run into something and say, knock it over. For my scare, we're going to push the player into the other room, then have the door slam and lock behind him.
void OnStart() { AddEntityCollideCallback("Player", "push", "Push", true, 1); AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1); }
The Callback for push I named Push, and the Callback for door_slam I named Slam.
Now you have to make the Functions.
void OnStart() { AddEntityCollideCallback("Player", "push", "Push", true, 1); AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1); } void Push(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "react_pant.snt", "push", 0, false); AddPlayerBodyForce(30000, 0, 0, false); } void Slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("cellar_1", true, true); SetSwingDoorLocked("cellar_1", true, true); PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0, false); }
Under the Push function, PlaySoundAtEntity is not necessary, but if you want that extra scare, you can keep it and Daniel will react with a gasp. The value I picked for the AddPlayerBodyForce is 30000. This will push the player as far as about the width of the cabinet_nice or cabinet_simple as mentioned above. I only wanted the player to be sent forward, but you might have to adjust your values based on where the door is (you might have to put it on the z one) Remember the values for AddPlayerBodyForce go X, Y, Z. Therefore the player will be pushed 30000 along the x axis. Y will send the player up or down. For Slam, I set the door to be closed, then locked. I also added a laugh to make it extra creepy.
Put all of that together and the scare should be a successful one! Good luck!
Requested by Datguy5! Check out his profile on FG! http://www.frictionalgames.com/forum/user-18514.html
For the famous and most crap-your-pants scare called “Flying Jesus”, you'll need an area and a male corpse.
void OnStart() { AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1); AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1); } void HolyJesus(string &in asParent, string &in asChild, int alState) { SetEntityActive("Jesus_1", true); AddPropForce("Jesus_1", 0, 0, 30000, "World"); } void Sound(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "24_iron_maiden.snt", "FlyingJesus_1", 0, false); }
I added the scary Iron Maiden sound to play when the corpse hit the Script Area. It adds a scarier jump effect, but it's optional of course. For the AddPropForce, you may have to tweak it. For me, 30000 was perfect, and whether it goes in X, Y, or Z depends on your map. For me it was Z. Here's one way to find out: Select a wall or object in the room. Click the + or - button under Position for X, Y, and Z and note which way the object goes. If it goes in the direction of the Script Area, (let's say it's X) then you put the 30000 under X.
Enjoy making your players freak out and pee their pants. :]
More pictures!
Created by JenniferOrange
IF YOU HAVE ANY OTHER REQUESTS FOR SCARES, PLEASE PM ME AT http://www.frictionalgames.com/forum/user-15434.html (YOU DO NEED TO BE EITHER REGISTERED/LOGGED IN TO FRICTIONALGAMES TO VIEW THIS PAGE!!)