Description:
Allows gas cans in scavenge to be randomly placed using a custom list of gas can locations. Each round 16 random gas can spawn locations will be selected. These locations will be the same for each team.
Gas can locations can be edited using the built in editmode. This spawns all gas cans currently saved gas can locations, and allows gas cans to be easily added, removed, or saved.
I created this because I found scavenge to begin to get boring with the same can spawns every single game. I absolutely love this game mode, and I hated to see myself begin to get bored with it. So I decided to make a plugin to spice things up a bit. This makes the winning team win because they can better adapt to their surroundings instead of how well they can memorize and execute the optimal path to each can.
I have included a custom set of spawn locations, about 300 total, as well. They are by no means required, and I encourage people to make their own locations. My friends and I actually had a blast finding neat places to put the cans. Felt like it was Easter time. ;P
Each map has its own file which contains all the spawn locations. These are located in the left4dead2/cfg/maps directory and have the filename format of <mapname>.txt. I decided to let each map have its own file because it adds simple portability. If somebody only wants random cans on some maps but not others they can simply remove the maps file.
Screenshots:
These screenshots were taken to show a bit of how the editmode looks and works. All cans are changed to have a red glow, and any cans that are currently being looked at by a player will have a green glow. Cans are able to be "selected" through most objects such as walls.
Screenshot1
Screenshot2
Screenshot3
Screenshot4
Screenshot5
Admin Commands:
sm_editcans - Toggles editmode.
sm_savecans - Saves the location of all spawned gas can to the <mapname>.txt file located in the cfg/maps/ directory.
sm_removecans - Removes all gas cans. Can only be used in editmode.
sm_reloadcans - Reloads all gas cans that were previously saved to the file. Can only be used in editmode.
User Commands:
sm_addcan - Spawns a gas can directly infront of the player. Can only be used in editmode.
sm_delcan - Deletes the gas can that the player is looking at. Can only be used in editmode.
CVars:
l4d2_scav_remix_version - Plugin version.
l4d2_scramble_gas_cans (1) - Determines if gas cans should be scrambled at the start of a round.
l4d2_scramble_notify (0) - Determines if a message should be sent when the gas cans are scrambled.
Credits:
A special thanks to Poje and Wrs for helping create the custom list of spawn locations.
Downtown1 for the functions to start/stop the AI director which are used for editmode.
Changelog:
* Version 0.2.3:
-Fixed a few small bugs
* Version 0.2.2:
-Fixed mistake in client 0 error checking code
* Version 0.2.1:
-Added check to make sure all changed cvars get restored
* Version 0.2.0:
-Added sm_ prefix to all commands
-Fixed cvar prefix
-Added cvar to disable gas cans from being scrambled
-Added cvar to show a notification when cans get scrambled
-Added user friendly notification when trying to use commands from server console, rcon, or host of a local server
* Version 0.1.0:
-Initial Release