Echolocation

If you liked this item, please rate it up on Steam Workshop page.

Author: Whiterabbit

Last revision: 2 Jan, 2014 at 11:46 UTC

File size: 415.51 KB

On Steam Workshop

Description:

-What is this addon-
It includes a level and some code. The level is completely dark with a custom material on the walls for effect.
By binding a key to the command "wt_echo" you can fire out an invisible beam that makes light when it hits the wall. The invisible beam (your ‘echo’) can bounce up to 3 times. Each player only sees their own echo lights.

-Why?-
See the video for what it’s like and to get an idea of what could be done with it. I am releasing the code for anyone to learn from (even though it’s somewhat messy and all in one file (not a good idea for writing a proper gamemode)). ‘Echolocation’ is an interesting concept for use in a game and I wanted to see what I could get working in Garrysmod.

-The code + map source-
Download the zip file from here https://www.dropbox.com/s/jhie73xkiwvbdji/wt_echolocation.zip
Unpack to your addons folder
(If you have this in your addons folder you should disable the workshop version)

-Misc Details-
The code will only run when on a map with a matching name ( starting with wt_el_ ), so it won’t interfere with standard gameplay. In this addon it includes a simple bar on the hud showing your ‘power level’ which limits how often you can shoot out echo beams; the hud and the power limit can be turned off easily within the code, but not in the workshop version. (Hud only shows when the addon is active, when on the correct level).
Each player only sees their own echo lights, this can also be easily changed in one line in the code.
I encourage you to try and play around with the code, even though it’s not the best, it’s very simple.

-Other-
How do I bind a key?
. – Open the console (default key is ~ (beside 1 on most keyboards))
. – Enter the following command: bind "F" wt_echo but replace F with the key you want to use