Difference between revisions of "Angelscript"
Jump to navigation
Jump to search
Outerbeast (talk | contribs) (WIP) |
Outerbeast (talk | contribs) m (→Miscellaneous) |
||
(28 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
[https://r4to0.github.io/asautodocs/nd_prerelease/index.html API auto-generated documentation is available here.] | [https://r4to0.github.io/asautodocs/nd_prerelease/index.html API auto-generated documentation is available here.] | ||
For information on the AngelScript language, visit the [https://www.angelcode.com/angelscript/sdk/docs/manual/doc_script.html official AngelScript manual here] | For information on the AngelScript language, visit the [https://www.angelcode.com/angelscript/sdk/docs/manual/doc_script.html official AngelScript manual here] | ||
− | + | == Getting Started == | |
− | {| class="wikitable" | + | {| class="wikitable" |
+ | |- | ||
+ | ! style="text-decoration:underline;" | Tutorials | ||
+ | ! style="vertical-align:middle;" | Basics of building scripts | ||
|- | |- | ||
− | + | | style="text-decoration:underline; " | [[Running Scripts]] | |
− | + | | style="vertical-align:middle; " | Covers how to import and execute script files, such as map scripts and plugins | |
|- | |- | ||
− | | style="text-decoration:underline;" | | + | | style="text-decoration:underline; " | [[Typecasting]] |
− | | style="vertical-align:middle;" | Covers | + | | style="vertical-align:middle; " | Covers how and when to use typecasts |
|- | |- | ||
− | | style="text-decoration:underline;" | | + | | style="text-decoration:underline; " | [[Debugging]] |
− | | style="vertical-align:middle;" | | + | | style="vertical-align:middle; " | Debugging scripts |
|- | |- | ||
− | | style="text-decoration:underline;" | | + | | style="text-decoration:underline; " | [[Entity Basics]] |
− | | style="vertical-align:middle;" | Covers the basics of | + | | style="vertical-align:middle; " | Covers the basics of what entities are and how to use them. |
|- | |- | ||
− | | style="text-decoration:underline;" | | + | | style="text-decoration:underline; " | [[Entity Intermediate]] |
− | | style="vertical-align:middle;" | Covers | + | | style="vertical-align:middle; " | Covers intermediate topics regarding entities. |
|- | |- | ||
+ | | style="text-decoration:underline; " | [[Custom Entities]] | ||
+ | | style="vertical-align:middle; " | Build your own custom entity | ||
|} | |} | ||
− | + | == API Features == | |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 28: | Line 33: | ||
! style="vertical-align:middle;" | Covers some fundamental aspects of writing scripts for Sven Co-op | ! style="vertical-align:middle;" | Covers some fundamental aspects of writing scripts for Sven Co-op | ||
|- | |- | ||
− | | style="text-decoration:underline; " | | + | | style="text-decoration:underline; " | [[CEntityFuncs|Entity Functions]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| style="vertical-align:middle; " | How to use the various entity functions. | | style="vertical-align:middle; " | How to use the various entity functions. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | Player | + | | style="text-decoration:underline; " | [[CPlayerFuncs|Player Functions]] |
| style="vertical-align:middle; " | Various player related functions | | style="vertical-align:middle; " | Various player related functions | ||
|- | |- | ||
− | | style="text-decoration:underline; " | Sound System | + | | style="text-decoration:underline; " | [[CSoundEngine|Sound System]] |
| style="vertical-align:middle; " | How to use the sound system. | | style="vertical-align:middle; " | How to use the sound system. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | Engine Functions | + | | style="text-decoration:underline; " | [[CEngineFuncs|Engine Functions]] |
| style="vertical-align:middle; " | How to use engine functions. | | style="vertical-align:middle; " | How to use engine functions. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | | + | | style="text-decoration:underline; " | [[Mapping/Custom_Keyvalues#Custom_keyvalues_in_Angelscript|Custom Keyvalues]] |
− | |||
− | |||
− | |||
| style="vertical-align:middle; " | Covers the usage of custom keyvalues in scripts. | | style="vertical-align:middle; " | Covers the usage of custom keyvalues in scripts. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | CEngine | + | | style="text-decoration:underline; " | [[CEngine]] |
| style="vertical-align:middle; " | Covers the CEngine class. This class includes the current time and frametime, as well as engine configuration and the global trace. | | style="vertical-align:middle; " | Covers the CEngine class. This class includes the current time and frametime, as well as engine configuration and the global trace. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | CGame | + | | style="text-decoration:underline; " | [[CGame]] |
| style="vertical-align:middle; " | Contains methods integral to the game's operation. | | style="vertical-align:middle; " | Contains methods integral to the game's operation. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | | + | | style="text-decoration:underline; " | [[Tracing]] |
− | | style="vertical-align:middle; " | Covers | + | | style="vertical-align:middle; " | Covers performing traces and usage of the TraceResult class, as well as related enumerations. |
+ | |- | ||
+ | | style="text-decoration:underline; " | [[CUtility|Utility Functions]] | ||
+ | | style="vertical-align:middle; " | Covers various utility methods | ||
|- | |- | ||
− | | style="text-decoration:underline; " | Hooks | + | | style="text-decoration:underline; " | [[Hooks]] |
| style="vertical-align:middle; " | Covers the purpose and use of hooks. | | style="vertical-align:middle; " | Covers the purpose and use of hooks. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | | + | | style="text-decoration:underline; " | [[Scheduler]] |
+ | | style="vertical-align:middle; " | Covers the use of the scheduler. | ||
+ | |- | ||
+ | | style="text-decoration:underline; " | [[CMath|Math]] | ||
+ | | style="vertical-align:middle; " | Covers the use of various math operations | ||
+ | |- | ||
+ | | style="text-decoration:underline; " | [[HUD]] | ||
+ | | style="vertical-align:middle; " | Covers the usage of various HUD elements | ||
+ | |- | ||
+ | | style="text-decoration:underline; " | [[Temporary Effects]] | ||
+ | | style="vertical-align:middle; " | Covers the use of temporary entities. | ||
+ | |- | ||
+ | | style="text-decoration:underline; " | [[File System]] | ||
+ | | style="vertical-align:middle; " | Covers the use of the virtual file system | ||
+ | |- | ||
+ | | style="text-decoration:underline; " | [[CConCommandSystem| Console Command System]] | ||
| style="vertical-align:middle; " | Covers the console command system. This is used to add console commands and variables. | | style="vertical-align:middle; " | Covers the console command system. This is used to add console commands and variables. | ||
|- | |- | ||
− | | style="text-decoration:underline; " | | + | | style="text-decoration:underline; " | [[Trigger_script#Scripting|trigger_script]] |
− | | style="vertical-align:middle; " | Covers the use | + | | style="vertical-align:middle; " | Build a trigger_script entity function |
+ | |- | ||
+ | | style="text-decoration:underline; " | [[squadmaker function]] | ||
+ | | style="vertical-align:middle; " | Describes the usage of the squadmaker entity to call script functions. | ||
+ | |- | ||
+ | | style="text-decoration:underline; " | [[ondestroyfn]] | ||
+ | | style="vertical-align:middle; " | Describes the usage of the "ondestroyfn" function | ||
+ | |} | ||
+ | |||
+ | == Data Types == | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! style="text-decoration:underline;" | Data Types | ||
+ | ! style="vertical-align:middle;" | Covers some common data types used in scripts | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[Strings]] | ||
+ | | style="vertical-align:middle;" | Covers the basics of strings in scripts | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[Vector|Vectors]] | ||
+ | | style="vertical-align:middle;" | Covers the basics of Vectors in scripts | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[RGBA]] | ||
+ | | style="vertical-align:middle;" | Covers the basics of the RGBA structure | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[EHandle]] | ||
+ | | style="vertical-align:middle;" | Covers the usage of EHandle structure for storing entity handles | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[CCVar]] | ||
+ | | style="vertical-align:middle;" | Covers how to create and use custom CVars | ||
|- | |- | ||
− | |||
− | |||
|} | |} | ||
− | {| class="wikitable" | + | == Miscellaneous == |
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! style="text-decoration:underline;" | Page | ||
+ | ! style="vertical-align:middle;" | Description | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[DateTime]] | ||
+ | | style="vertical-align:middle;" | Covers the basics of the date and time structure | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[SayParameters]] | ||
+ | | style="vertical-align:middle;" | Stores data used by the ClientSay [[Hooks|hook]]. | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[Animation Extensions]] | ||
+ | | style="vertical-align:middle;" | Animation Extensions used by weapons for player models. | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[Default Ammo Types]] | ||
+ | | style="vertical-align:middle;" | Default Ammo Types used by the game. | ||
+ | |- | ||
+ | | style="text-decoration:underline;" | [[Bullet]] | ||
+ | | style="vertical-align:middle;" | The Bullet enum contains bullet types used by the game. | ||
|- | |- | ||
− | + | | style="text-decoration:underline;" | [[KeyValueBuffer]] | |
− | + | | style="vertical-align:middle;" | Key Value Buffer | |
|- | |- | ||
− | |||
− | |||
|} | |} | ||
+ | |||
+ | [[Category:Scripting]] |
Revision as of 17:14, 16 April 2025
This page contains basic coverage and tutorials for Sven Co-op's Angelscript API.
API auto-generated documentation is available here. For information on the AngelScript language, visit the official AngelScript manual here
1 Getting Started
Tutorials | Basics of building scripts |
---|---|
Running Scripts | Covers how to import and execute script files, such as map scripts and plugins |
Typecasting | Covers how and when to use typecasts |
Debugging | Debugging scripts |
Entity Basics | Covers the basics of what entities are and how to use them. |
Entity Intermediate | Covers intermediate topics regarding entities. |
Custom Entities | Build your own custom entity |
2 API Features
API Features | Covers some fundamental aspects of writing scripts for Sven Co-op |
---|---|
Entity Functions | How to use the various entity functions. |
Player Functions | Various player related functions |
Sound System | How to use the sound system. |
Engine Functions | How to use engine functions. |
Custom Keyvalues | Covers the usage of custom keyvalues in scripts. |
CEngine | Covers the CEngine class. This class includes the current time and frametime, as well as engine configuration and the global trace. |
CGame | Contains methods integral to the game's operation. |
Tracing | Covers performing traces and usage of the TraceResult class, as well as related enumerations. |
Utility Functions | Covers various utility methods |
Hooks | Covers the purpose and use of hooks. |
Scheduler | Covers the use of the scheduler. |
Math | Covers the use of various math operations |
HUD | Covers the usage of various HUD elements |
Temporary Effects | Covers the use of temporary entities. |
File System | Covers the use of the virtual file system |
Console Command System | Covers the console command system. This is used to add console commands and variables. |
trigger_script | Build a trigger_script entity function |
squadmaker function | Describes the usage of the squadmaker entity to call script functions. |
ondestroyfn | Describes the usage of the "ondestroyfn" function |
3 Data Types
Data Types | Covers some common data types used in scripts |
---|---|
Strings | Covers the basics of strings in scripts |
Vectors | Covers the basics of Vectors in scripts |
RGBA | Covers the basics of the RGBA structure |
EHandle | Covers the usage of EHandle structure for storing entity handles |
CCVar | Covers how to create and use custom CVars |
4 Miscellaneous
Page | Description |
---|---|
DateTime | Covers the basics of the date and time structure |
SayParameters | Stores data used by the ClientSay hook. |
Animation Extensions | Animation Extensions used by weapons for player models. |
Default Ammo Types | Default Ammo Types used by the game. |
Bullet | The Bullet enum contains bullet types used by the game. |
KeyValueBuffer | Key Value Buffer |