-
Notifications
You must be signed in to change notification settings - Fork 10
ScriptModules
AGS script modules are a way for AGS script code to be reused and shared. They are written in AGS script code entirely, and thus are independent of the platform on which a game is run.
A Script Module is a pair of an AGS Script file and an AGS Script Header file, with an additional metadata.
You can manage them by expanding the Script entry in the tree of Explore Project panel.
You can right click on Scripts to show options:
-
New script
- create a new module from scratch
-
Import script...
- load a module from a
.scm
file that you have downloaded
- load a module from a
-
New folder
- creates folder, which can be used to organize script modules in groups
Right clicking on a folder of Script Modules should give the above options and additionally:
-
Move up
- The order of modules can be important, as it reflects the order in which they are compiled and run, so this option and the next let you change their ordering.
-
Move down
- moves the script module up in the order
Right clicking the module should give you the options:
-
Rename
- Give the module another name
-
Delete
- Removes an existing module from the game
-
Export...
- save your own module as a
.scm
file that you can share with others
- save your own module as a
When you click a module directly, you can use the properties panel to enter a brief description of the module, a version number and authorship details in the module manager when you create a module. Double clicking will expand and revel both the script and the header files.
As when writing scripts, you need to reference a function that was previously declared above, script modules should be ordered so that modules below only reference functions that are import declared in the headers of the modules above them in the Script listing in the Explore Project.
You can find useful script modules from others in the Modules & Plugins board in the ags forums.
See also: More on handling multiple scripts
Getting Started in AGS
Editor
- New Game templates
- Editor Preferences
- General Settings
- Default Setup
- Colours Editor
- Room Editor
- Character Editor
- Cursor Editor
- Dialog Editor
- Font Preview
- GUI Editor
- Inventory Items Editor
- View Editor
- Sprite Manager
- Music and sound
- Voice speech
- Script Modules
- System limits
- Log Panel
- Plugins
- Other Features
Engine
Scripting
- Scripting Tutorial
- Scripting Language
-
Scripting API
- Script API Overview
- Standard Constants
- Standard Enumerated Types
- Standard Types
- Game variables
- Global arrays
- Global event handlers
- repeatedly_execute / repeatedly_execute_always
- Custom dialog options rendering
- Global functions: general
- Global functions: message display
- Global functions: multimedia actions
- Global functions: palette operations
- Global functions: room actions
- Global functions: screen effects
- Global functions: wait
- AudioChannel functions and properties
- AudioClip functions and properties
- Camera functions and properties
- Character functions and properties
- DateTime functions and properties
- Dialog functions and properties
- DialogOptionsRenderingInfo functions and properties
- Dictionary functions and properties
- DrawingSurface functions and properties
- DynamicSprite functions and properties
- File functions and properties
- Game functions and properties
- GUI functions and properties
- GUI control functions and properties
- GUI Button functions and properties
- GUI InvWindow functions and properties
- GUI Label functions and properties
- GUI List Box functions and properties
- GUI Slider properties
- GUI Text Box functions and properties
- Hotspot functions and properties
- Inventory item functions and properties
- Maths functions and properties
- Mouse functions and properties
- Object functions and properties
- Overlay functions and properties
- Parser functions
- Region functions and properties
- Room functions and properties
- Screen functions and properties
- Set functions and properties
- Speech functions and properties
- String functions
- System functions and properties
- TextWindowGUI functions and properties
- ViewFrame functions and properties
- Viewport functions and properties
- Obsolete Script API
- Event Types
- Key code table
- Audio in script
Legal Notice
Getting in touch
Misc
Hidden