Serious Sam 4 – The Scripting Guide

Serious Sam 4 – The Scripting Guide 1 - steamlists.com
Serious Sam 4 – The Scripting Guide 1 - steamlists.com
This guide is aimed at helping modders, both newcomers to Serious Engine and veterans, to improve their modding capabilities by incorporating lua scripting into their mods.

 
 

Introduction

 
imho this guide perfect for fundamental scripting knowledge 
– nano prefetcher, CTO and co-founder of Agiriko 
 
First, I would like to note that this guide is aimed at people who are 
(1) at least minimally competent in operating Serious Editor; 
(2) at least minimally competent in programming (in general) and have the ability to learn and research by themselves. 
 
I won’t be telling you how to open a level or a model in SED and how to place entities – for that there exist basic guides on different topics: 
https://www.youtube.com/playlist?list=PLF2smFESL8ZCkahUnRtJrODX6K4f-18QZ 

https://www.youtube.com/watch?v=OolUzhCVRYY?list=PLF2smFESL8ZCkahUnRtJrODX6K4f-18QZ” target=”_blank”>https://www.youtube.com/playlist?list=PLF2smFESL8ZCkahUnRtJrODX6K4f-18QZ

https://steamcommunity.com/sharedfiles/filedetails/?id=916575958 
 
I also won’t be teaching you the basics of the Lua scripting language. Reality is, the number of native Lua constructs which are available in Serious Engine can be counted on both hands: 
you have your basic if-elseif-else, for and while loops, base types, functions, tables and table-related functions, strings and string-related functions, and that’s it. Almost everything else is a Croteam-added construct or function, which you can find in the Serious Editor using suggestions box (section “Suggestion box”). 
 
The guide is intended to be fundamental. So if it feels too much for you at first, I recommend lurking in original CT scripts (both on levels and used for, say, enemy AI). Checking other people’s scripts is a good way of expanding your understanding of the capabilities of the scripting in the game, and just a source of (possibly) valuable techniques. 
You can also find some code snippets which can help you familiarize with the syntax here: https://steamcommunity.com/sharedfiles/filedetails/?id=916575958 
 
I also won’t be teaching you the basics of the Lua scripting language. Reality is, the number of native Lua constructs which are available in Serious Engine can be counted on both hands: 
you have your basic if-elseif-else, for and while loops, base types, functions, tables and table-related functions, strings and string-related functions, and that’s it. Almost everything else is a Croteam-added construct or function, which you can find in the Serious Editor using suggestions box (section “Suggestion box”). 
 
The guide is intended to be fundamental. So if it feels too much for you at first, I recommend lurking in original CT scripts (both on levels and used for, say, enemy AI). Checking other people’s scripts is a good way of expanding your understanding of the capabilities of the scripting in the game, and just a source of (possibly) valuable techniques. 
You can also find some code snippets which can help you familiarize with the syntax here: