Sounds like any other programming language when I say it like that. But the scripts created dependency trees which got triggered. So not a declamatory language with subroutines etc.
Anyway, blast from the past.
The ScummVM-Wiki [1] recommends building fangames as text-adventures first, so all the characters, places and stories are defined before starting with graphics. They recommend Inform [2]
https://www.youtube.com/watch?v=qrP8h0yUCLo
Asked, awaiting reply.
In summary you use a declarative English-like language, saying things like "The Library is a room" and "Inside the Library is a book". Inform's compiler takes those rules and builds a runnable text adventure using an engine based on the Infocom one that Zork was written with.
It comes with a syntax highlighting IDE, including a game player.
* Wintermute Engine: http://dead-code.org/home/
* Escoria (for Godot): https://github.com/godot-escoria
* JavaScript Graphic Adventure Maker: https://kreezii.github.io/jsgam/
I think it is important to add that different engines have varying success in actually producing commercial games. AGS is famous exactly because it has produced many, many successful games, often by solo developers. It is being challenged because it is so very old.
This is sort of the way people will not try a JS web framework for a major project till others have worked out the kinks.
https://cloud.githubusercontent.com/assets/6229260/4420346/1...
... Klik n Play, The Games Factory, Click n Create, Multimedia Fusion ... I get all fuzzy thinking about it.