Scripts that go with mecklenburgV to activate various map functionality

Shane Spies 088c3be092 Merge branch 'master' of ssh://git.fjmaps.net:9090/Maps/MecklenburgV_Script 6 anos atrás
LICENSE ba6a0e514a Initial commit 6 anos atrás
MecklenburgV_Final.sma d6d0b82986 added script 6 anos atrás
README.md d2e548a16a Update 'README.md' 6 anos atrás

README.md

Mecklenburg V Script

An AmxModX script that's used in combination of my other map, MecklenburgV to give some extended functionality.

Commands

amx_setlights <a-z> : Set the brightness of outdoor lights, Z is the brightest while A is the dimmest.

amx_togglefog : Toggles gl_fog 0/1 on clients. Fog on makes the client have "daytime" while fog off reveals the nighttime skybox.

amx_toggleoutdoorlights : Toggles the outdoor streetlights on/off. There's also a switch in the sewers that does the same thing.

amx_toggleday <0-24> : Sets the time of day, pretty much uses setlights, togglefog, and outdoor lights to accomplish the effect.

amx_togglerain <0-100> : Sets the amount of rain to fall.

amx_toggleindoorlights : toggles the indoor lights that are not part of a switch.

Building and Installing

Drag and drop the SMA onto compile.exe in the amxmodx/scripting/ folder. Take the .amx file that was generated and then place it into your amxmodx/plugins directory add in MecklenburgV_Final.amx to the config/plugins.ini at the very bottom.

How does this all work?

The Lights

Point lights that have an entity name inside of Half-Life 1 persist through the amx command setlights. Meaning that they stay the same intensity. I took advantage of that and named all of the lights that should be on during the dark and categorized them in the map to make this effect.

The Rain

At the very top of the map, there's a moving door that blocks out the rain. Crude, but efficient since entity updates do not spark a change in the ts emitters.

Night/Day Effect

Combination of the named lights and the fog. Ideally, we'd want to change the color of the fog to reflect the right time of day, but those used debug commands on clients to override their fog globally. We used to do that in the HWRP plugins, but I left that out of this. This plugin still changes the fog for the client, and that's still a bad thing to do, but the fog was really underused inside of most TS maps, so it doesn't really matter too much anyways.