Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion automated_updates_data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"last_automated_updates_commit": "50afd05049bc87c288dc4c7ccbce55388522fe53",
"last_automated_updates_commit": "ec1b477c74811b1dac3bb8aa7aa54040126d52a3",
"last_improved_things": [
{
"date": "2026-02-16",
Expand Down
2 changes: 1 addition & 1 deletion docs/gdevelop5/events/js-code/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To add a JavaScript event, click on the + button in the Events Sheet toolbar, an

![](pasted/20230305-105515.png)

When added, click on the code to edit it. The code will be executed each time the event is reached by GDevelop.
When added, click on the code to edit it. The code will be executed each time the event is reached by GDevelop. The scroll position and cursor position are saved so that when you reopen the tab, you return to where you were.

In all JavaScript events, you have access to a variable named `runtimeScene`. This variable represents the scene being played. Below is an example of a standard GDevelop event, and an equivalent event that uses a JavaScript:

Expand Down
4 changes: 4 additions & 0 deletions docs/gdevelop5/preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ If **Cancel changes** is selected, any edits in the current window are **abandon
If **Apply changes** (default) is selected, any edits in the current window are **applied** (only available in some windows).


## JavaScript events

In the preferences, you can enable **Show type errors in JavaScript events** to display type checking errors directly in the JavaScript code editor. This can help catch mistakes such as calling a method that doesn't exist on an object. It is off by default to keep the editor uncluttered while you write code.

## Hints and explanations

GDevelop displays hints and explanations for certain features. You can turn them off if you prefer.
Expand Down