Skip to content

Using VScript as a HL2 mapper

Blixibon edited this page May 29, 2020 · 7 revisions

This article is for Half-Life 2/Source 2013 mappers who have no experience with VScript to learn what it is and how they can use it in their maps.

Using VScript to simplify map logic

As a Half-Life 2/Source 2013 mapper, VScript may seem unfamiliar or complicated for you since it's basically in-map programming. For that crowd, it actually works best when it makes things less complicated.

Source's logic entities (and Mapbase's expansions to them) make the I/O system a flexible tool for doing complex things, like math or storage. However, this can get very complicated very quickly, as several different outputs fire several different inputs on several different entities as one big, messy jumble of icons in Hammer's 3D view.

VScript can be used to simplify these types of logic contraptions, as things like storing numbers, adding/subtracting numbers, finding entities, etc. can happen using just one line of text. This can be done to make map logic seem less complicated and sometimes it's actually necessary to reduce the level's entity count.

If you want to learn how to use VScript, it may be best to start by doing it alongside the I/O system. Click here to go to a tutorial on how you can use VScript to interact with the I/O system.

Using VScript to do what's not possible with I/O

While you can just use VScript to simplify map logic, it also unlocks a lot of potential in other areas. It's a pathway to many abilities some mappers would consider...unnatural. If you're already a programmer, then it may already be natural. If not, then it may seem a bit more complex.

Click here to go to a tutorial which makes it simpler and easier to understand.

Clone this wiki locally