Destinations

Destinations

Onvoldoende beoordelingen
Scripting For Source 2
Door SparkyMcSparks
Basic introduction for VScript in Destinations / Source Engine 2.
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Scripting Overview
LUA[en.wikipedia.org] is the Source 2 scripting language. It's compiled at runtime by the game executable during the level load, and conveniently, can also be reloaded by restarting the map for quick iteration without having to recompile the map nor rebuilding VPK.

A great example of something created on Source 2 and utilizing LUA VScript is Robot Repair:

Through a mixture of Hammer and VScript, Robot Repair was created using the same tools; such an expierence could theoretically be created in Destinations.
Script File Structure
LUA scripts are found in the maps_scripts folder for your custom content addon:
...\Steam\steamapps\common\Destinations\game\steamtours_addons\YOUR_ADDON_NAME\scripts\vscripts\map_scripts\

Note: Scripts folder structure may not exist, so you will have to make it.

The engine looks for a LUA file that has the same name as your map in the maps_scripts folder:
...\Destinations\game\steamtours_addons\YOUR_ADDON_NAME\scripts\vscripts\map_scripts\YOUR_MAP_NAME.lua

To verify the game has found your script, you can open up the VConsole and filter for "map_script" to see what's been reported:
Syntax Highlighting
You'll want to use an integrated development environment (IDE) to help make your scripting easier with syntax highlighting, formatting, functions, etc...

Some great options are:

2 opmerkingen
hammy 1 okt 2016 om 14:45 
Everytime I see someone say "LUA" I get triggered. Lua is not an acronym!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Rectus 30 jul 2016 om 11:22 
Nice work.