Garry's Mod

Garry's Mod

Simple Horror
 This topic has been pinned, so it's probably important
10tickles  [developer] 22 Sep, 2016 @ 9:58am
Guide for mappers
This post will explain how mappers can utilise the features of this gamemode in their horror map(s)

Simple Horror gamemode allows you, the mapper, to easily use a number of horror features which are not normally available in Hammer Editor. I will begin by explaining the process of using these features, and then I will list and explain the features in-depth.

To be able to use a Simple Horror feature, you will firstly need to open your map in Hammer Editor. Now go to the entity tool and insert a lua_run entity. This entity is essentially the communication between Hammer Editor and Simple Horror. Don't worry, you won't have to type in any complicated coding :steammocking:. Switch back to the selection tool and double-click the entity (to open the properties dialogue). In the name section, give it anything that is easy for you to refer to later on. The code section is where you will put the feature that you want (I'll explain soon). Hit apply and close the properties dialogue. The code in the lua_run entities must be triggered to run, they wont just run on their own.
If the feature you want is somethig you want to immediately apply when the map loads (such as disabling sprinting), you can use a logic_auto entity to trigger it. If it is something you want to apply later on (such as changing the weapon loadout), then you can use a simple trigger. Any trigger will work with the lua_run entities; you can have a button which disables flashlights and another which re-enables them. You can even have a logic_timer alternating between enabled and disabled, giving a strobe effect. Experiment around with it a little and you'll get the hang of it pretty quickly. Also, a lua_run can triggered as many times as you want.
^Hopefully you understood that and it wasn't too boring.

Now, on to the actual features:
Note: whenever you see the word bool, replace it with true or false (depending on which one you want, should be quite self-explanatory).

Feature
What to put in code section
Explanation
Flashlight enable/disable
Flashlight(bool)
Disables or enables the flashlight for everyone. Default is enabled.
Freeze/unfreeze player movement
Freeze(bool)
Freezes or unfreezes the movement of all players. Default is unfrozen (obviously).
Sprint allow/disallow
Sprint(bool)
Allows or disallows sprinting for everyone. Default is disallowed.
Show/hide health and suit overlay
ShowUI(bool)
Shows or hides the health and suit numbers in the bottom left of the screen. Default is hidden.
Give/remove weapons
Weapons(bool) OR Weapons({weapon1,weapon2,etc})
This is *slightly* more complicated than the other features. See below for explanation.

When you set weapons with this feature, it instantly resets everyone's loadout to the one you have chosen. You will also spawn with the weapons. You can set weapons to true or false. True gives the default weapons, false removes all weapons (weapons can still be picked up, but will be lost on death). You can also choose specific weapons to spawn with. To do this, create a list that looks like this: {weapon1,weapon2,and so on} but instead of weapon1 and weapon2, put the name of the weapons you want (list of weapon names is below). For example, putting Weapons({pistol,pulserifle,rpg}) in the code section would give a pistol, pulse rifle and an RPG when the lua_run was triggered. There are also a few weapon selection presets (also listed below):

Name to put in list
What it is
magnum
.357 Magnum pistol
physgun
Physics Gun
crowbar
Crowbar (what else)
crossbow
Crossbow
pulserifle
Pulse Rifle
bugbait
Antlion Bug Bait (mostly useless)
grenade
Frag Grenade
pistol
9mm Pistol
rpg
Rocket Launcher
shotgun
Shotgun
smg
Sub Machine Gun
stunstick
Stunstick
slam
SLAM remote explosive device
default
The default Garry's Mod loadout*: Magnum, physics gun, gravity gun, crowbar, crossbow, pulse rifle, frag grenade, pistol, rocket launcher, shotgun and sub machine gun. Don't insert this as part of a list, just put Weapons(defaultweapons).
all
Every available weapon*: Magnum, physics gun, gravity gun, crowbar, crossbow, pulse rifle, frag grenade, pistol, rocket launcher, shotgun, sub machine gun, bug bait, stunstick and SLAM. Don't insert this as part of a list, just put Weapons(all).
notools
Same as default but without the physics gun. Don't insert this as part of a list, just put Weapons(notools).

*Note that the toolgun and camera are only available in sandbox gamemodes, so they cannot be used in this gamemode.

Hopefully this post was informative and helps you create a great horror map! Don't forget to add this gamemode as a requirement for your map so you know that it will work for everyone.
Last edited by 10tickles; 22 Sep, 2016 @ 7:44pm