An Introduction to Squirrel

From SigMod
Revision as of 01:06, 26 October 2023 by Mince (talk | contribs)
Jump to navigation Jump to search

Overview

This is a relatively brief beginner's guide to the Squirrel language (v3.2) aimed at people with no programming experience interested in trying their hand at VScript. While this guide is not technically specific to any Source game in particular, it is for version 3.2 which is unique to TF2's version of Squirrel (L4D2, Portal, etc. run on older versions of Squirrel), so in practice this guide is directed at TF2 players.

If you already have experience with C-like languages or programming in general I would recommend you visit the Squirrel Reference Manual for a more expedited learning experience.


Getting Started

While it's possible to compile the Squirrel source code into binaries so that you can test your code outside of a Source game, it's really not too much trouble to launch TF2 and

Keywords and Identifiers

Constants

Comments

Data Types

Literals and Operators

Expressions

Intro to Functions

Intro to Objects

Scope

Control Flow

Exceptions

Enums

Arrays

Tables

Functions

Generators

Delegation

Weak References

Classes

Inheritance

Metamethods