Table of Contents

Scares

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.

Scare 1 - Throwing The Player

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.

  1. Place the script area. Once again, mine is right at the bottom of a staircase. Re-name the area to what ever you'd like. I named mine push. (See picture 2 at the bottom.)
  2. Now you need to open the door. In the Level Editor, click on the door. Under the Entity tab, there's an option called OpenAmount. Keep clicking the + button or simply type in the number 1. This will make the door all the way open. You can also re-name your door. Mine is called cellar_1.
  3. Now you need to make the area the player will run into that causes the door to slam. Where you put it depends on how far you want the player to be thrown. For mine, the distance between the script area and the door is about the width of the cabinet_nice or cabinet_simple. Make this area rather large to be certain the player will collide with it. I re-named that script area door_slam. (See picture 1 at the bottom.)
  4. Now it's time for scripting! Open the map's .hps file. We have to make 2 collides, one for push and one for door_slam.
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",