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!
This scare is an unexpected one. I warn anyone who wants to use this scare to NOT over-use it. It's great to use when there is peaceful music and everything seems so perfect.. and then a pot explodes, dramatically changing the music to that of a nervous feeling. I won't be showing you guys how to get the music, only how to make the pot explode. The rest is up to you.
*WARNING: THIS SCARE AS ONLY BEEN TESTED WITH VASE_01 AND VASE_02 FOUND IN ENTITIES>CONTAINER*
First things first: grab yourself a pot. I'll be using vase_01 found under entities>container. You can experiment with different ceramics, but only things Daniel can pick up, throw, and break will work. Place your chosen ceramic on a surface if you'd like. I'll just put mine on a small table. Re-name your 'pot grenade' to whatever you'd like. I'm naming mine pot_explode.
Next, make a script area. It shouldn't be too far away from the exploding pot. Make sure it's big/tall enough so the player will collide with it! Re-name it as well. I named mine explode_scare. Now it's already time to script!
void OnStart() { AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1); } void Explode(string &in asParent, string &in asChild, int alState) { SetPropHealth("pot_explode", 0); } void OnEnter() { } void OnLeave() { } </font>
The script is very self-explanatory. You collide with the script area, and the health of the pot goes to 0, causing it to explode. Feel free to add some smoke particles or other
sounds!
(I felt like this one didn't need any pictures, so..)
Good luck!
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!!)