Scripting

From Serious Sam's Bogus Detour
Revision as of 12:25, 22 June 2017 by Scratch (talk | contribs) (Created page with "Scripts in Serious Sam's Bogus Detour are written in [http://www.angelcode.com/angelscript/ Angelscript]. For a reference overview of the scripting language, check out [http:/...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Scripts in Serious Sam's Bogus Detour are written in Angelscript. For a reference overview of the scripting language, check out "The script language" on the Angelscript website.

Script types

Game modes

Gamemodes define rules about what should happen on the global level. A gamemode is for example campaign, survival, deathmatch, team deathmatch, etc. See also Creating a GameMode.

World scripts

Worldscripts are the in-editor visual scripting elements. Scripts have properties that can be set in the editor, they can target each other or other units, and they are only visible within the editor. In the game, only their functionality remains. Examples of worldscripts include SpawnUnit, AreaTrigger, LevelStart, LevelExit, Variable, ChangeVariables, etc. See also Creating a WorldScript.

Behaviors

Behaviors are the brains of units. Each unit can have a behavior, which allows them to have logic such as movement or interaction. For example, this could be a Pickup, Breakable, CompositeActorBehavior, Player, etc. See also Creating a Behavior.

IDE

There is currently not a lot of good IDEs available that autocomplete Angelscript, sadly. Therefore, we recommend you use an advanced text editor such as Sublime Text or Notepad++. For Sublime Text, there is a pretty good syntax highlighter for Angelscript that you can install.

API reference

You can find the API reference for the engine here, and the API reference for the base resources here.