Skip to content

Commit b9d92df

Browse files
authored
docs: add notes about script globals
1 parent d058ece commit b9d92df

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/src/ScriptingReference/introduction.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22

33
This part of the book covers the user-facing API of the scripting languages supported by BMS. This will be where you will want to forward your script users to get started with scripting in BMS.
44

5-
If you are a modder, welcome! 👋, apologies for the rust-centricity of this guide, we are working on it!
5+
If you are a modder, welcome! 👋, apologies for the rust-centricity of this guide, we are working on it!
6+
7+
## Globals
8+
9+
Scripts will have access to a few global variables in most callbacks:
10+
- `world`: a static reference to the world, with all sorts of functions available
11+
- `entity`: the entity the script is attached to, not available on load/unload callbacks
12+
- `script_id`: the ID of the current script

0 commit comments

Comments
 (0)