VIP

New GameMaps in development!

x

We are working hard to bring you the best experience possible with our upcoming relaunch!

You can help fund the relaunch by
Upgrading to VIP or Donating.

  • VIP Goal Progress: 100% Goal Reached!
  • Top Donator: Anonymous ($1,000)
Left 4 Dead 2
Left 4 Dead 2 is a single-player and multiplayer co-operative survival horror FPS game.
VSLib Developer Guide - Helpful Addons
5,645
Here are some things that Neil created to aid with scripting. These are especially useful if you do not have Visual Studio installed. None of them are necessary for VSLib but are provided for your convenience!
Notepad++ L4D2 VScript Syntax Highlighter
If you have or use Notepad++, then Neil's syntax config may help you. What a lot of people do is use the Lua or C++ highlighter because there is no Squirrel highlighter, but that usually leaves out some colors, resulting in ugly highlighting. The solution: add Squirrel highlighting support to Notepad++: download Neil's config here and drop it into C:\Users\YOUR_USER\AppData\Roaming\Notepad++\
Squirrel Syntax Checker (@TODO not finished yet)
Neil coded a small executable that will print Squirrel syntax errors into the output window in Notepad++. This is useful to check if you have any compile-time errors quickly without needing to re-load the entire map or start L4D2. Download the file and place it somewhere. In Notepad++, go to Run > Run... (or press F5) and type this:
"<path to vslibcomp.exe>" "$(FULL_CURRENT_PATH)"
Replace the <path to vslibcomp.exe> with the full path to the file you just downloaded. Do not remove the quotes-- the quotes are important. That's it. Just hit Run and watch your script compile. Any errors will output to the Notepad++ console or display stand-alone in a separate console window. You can also hit Save and it will show up as a shortcut in the Run menu.

You may be wondering why it's useful, as all you have to do is load the map to find out scripting errors. Well, every time you change the script, you need to reload the map. If you have missing semicolons or parentheses, then that's just a waste of time because you need to fix it and reload all over again. This program will only compile and check the syntax-- it won't run the game. That makes it much faster. Note that this won't check for run-time errors-- it only checks for syntax errors like missing brackets or whatever.
Starting your L4D2 mutation from Notepad++
To start the game right from Notepad++, go to the Run menu and click Run (or press F5). Enter the following:

"C:\Program Files (x86)\Steam\SteamApps\common\Left 4 Dead 2\left4dead2.exe" -dev 3 -console -toconsole -sw +map "c1m2_streets MutationName"

Replace the bold red text with the name of your mutation. Lastly, hit Save and give it a shortcut key if you want. Now, whenever you want to test your script, all you have to do is go to the Run menu and click on your shortcut.
Conclusions
Now you're all set up and ready to write your first mutation. Read on.
I found this article helpful
I did not find this article helpful
What people are saying...
You must be logged in to post a comment.
There are no comments yet for this guide.