Listen for one gameplay change
On this page
0.86.4.0 / DEBUGGING
RUNTIME WALKTHROUGH
A native script can subscribe to the Runner when several interactions can change the same entity. A listener sees the room, object ID and exact path that committed.
func listen_for_lamp(): if not Runtime.property_committed.is_connected(_on_commit): Runtime.property_committed.connect(_on_commit)func _on_commit(room_id, entity_id, path, outcome): if room_id == "workshop" and entity_id == "desk_lamp": print(path, " ", outcome.status)1
Connect once#
Put both functions in the same native GDScript. Call listen_for_lamp when your script has a live Runtime, before the switch can fire. Use your real room and lamp IDs. The connection guard lets you call the setup again without adding the same listener twice.
2
Compare the observations#
Apply a new intensity, repeat it, then try an invalid value. The counter can include the unchanged repeat. The listener usually reports only the first change. The invalid call should return a failure and leave both the lamp and the successful-write counters alone.
3
Handle loading separately#
If your code must react when a checkpoint restores the room, use the room’s state-restored action list or OnRoomStateRestored. Ordinary entity commit notifications are suppressed during restore. The room event is the place to refresh a display that depends on restored state.
A useful bug report
Record the Studio version, renderer, room ID, entity ID, property, requested value and scope. Include ok and the full error or result. For a visual issue, hold the camera still and capture the same view before and after.
For a performance check, keep the same room and camera. In Godot’s Profiler and Monitors, record frame time, nodes, resources and memory before repeated writes, after them, and again after leaving the room. The outcome counters tell you how the calls finished. Use the measured trends to investigate slowdowns or growth.
PCA 3D / Debugging
