An Introduction to Squirrel: Difference between revisions

From SigMod
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Overview ==
== 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 [https://developer.valvesoftware.com/wiki/VScript VScript].
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 [https://developer.valvesoftware.com/wiki/VScript 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 [http://squirrel-lang.org/squirreldoc/reference/index.html The Squirrel Reference Manual] for a more expedited learning experience.
 
If you already have experience with C-like languages or programming in general I would recommend you visit the [http://squirrel-lang.org/squirreldoc/reference/index.html Squirrel Reference Manual] for a more expedited learning experience.




== Getting Started ==
== 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 ==
== Keywords and Identifiers ==

Revision as of 01:06, 26 October 2023

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