Creating Point and Click Games with Escoria

Instructions and commands

Commands in Esc files are lines that consist of a keyword followed by its parameters, separated by spaces and optionally followed by a condition list, as seen earlier.

Some commands will run instantaneously so that the next command is executed right after it, and some are blocking, meaning that the next command will run only after the current command finished its work.

Game state commands

set_global name value

Sets the global flag name to the given boolean value.


set_global introduced true

set_globals pattern value

Sets all the flags matching pattern to the given value.

Patterns are just like normal flag names, but you can use the * special character to match multiple flags. For example player_* would match any flag starting with player_.


set_globals i/* false

set_state object state

Changes the state of the object. State being any name.

This also plays an animation if an animation of the same name exists in the object’s scene. Be careful though, as the state is saved in save files, the animation will run every time you enter the scene.

You may want to have just a simple animation that represents the state, and use another animation (with the anim command) for the transition to that state.

set_state bamboo_god angry

set_active object value

Makes object visible if value is true, or invisible if value is false and it also deactivates all the events for that object so that you can’t click on it.


set_active bamboo_god true

Operations on items

say object text [type] [avatar]

Opens a new dialog box for object with the specified text in it. This command will block until the player has closed the dialog box.

The type argument is optional and specifies the name of dialog box kind to be displayed. If this parameter is not given, the default box will be used.

The avatar argument is also optional and names which avatar image is to be displayed in the dialog box.


say old_man "Good! Now offer it to our almighty panda god, I'll summon them for you." default avatar_old_man

anim object name [reverse] [flip_x] [flip_y]

Runs the specified name object animation.

Be aware that this command is non-blocking and the next command will run right after the animation started.

The last three parameters are optional and let you:

  • reverse the animation when true or play it in the right order when false
  • flip the x axis of the animated graphics when playing the animation when flip_x is true and
  • flip the y axis  when flip_y is true.

Be aware that the flip_x and flip_y parameters require that the item’s root be of Node2D type.


anim bamboo_god god_appears true

cut_scene object name [reverse] [flip_x] [flip_y]

This commands does the same thing anim does, but the command blocks the execution of the following commands until the animation finishes.


cut_scene bamboo_god god_appears true

teleport object1 object2

Sets the position of the object1 object to the position of the object2.

walk object1 object2

Make object1, usually the player, walk towards object2. The speed is determined by the speed property of the object.

This command doesn’t block.

walk_block object1 object2

This is a variant of the walk command that blocks until the object arrived to its destination.

Other commands

debug strings

This command displays the given strings in the Godot console.


debug "Player was introduced" "Now searching for the bamboo"

wait seconds

Blocks the execution until the number of seconds elapses.


wait 3

change_scene path

Change the current scene to the one specified by the given path.


change_scene "res://scenes/other-scene/scene.tscn"

spawn path [object]

Creates a new item in the scene by loading it from the file specified by path.

The optional object parameter lets you position the new object to the position of the specified object.


Stops the execution of the current Esc event altogether.


Restart the execution of the last block from the beginning of that block. It also works with entry points.

sched_event time object event

Schedule an event by running the specified event of the specified object in the future as passed in the time parameter. The time is given in seconds.

If an event is already running for the given object while the timer is up, the scheduling will wait until that event finishes.

camera_set_pos speed x y

Moves the camera view towards the coordinates given as x and y coordinates at the speed (in pixels per seconds) given by the speed parameter.

If 0 is given as the speed, the camera is instantaneously moved to the target coordinates.

camera_set_target speed object1 object2 …

Sets what object(s) the camera should be trying to point and at which speed should it try to catch up. By default the camera follows the player.

If you specify multiple objects, the camera will follow the middle point between all the specified objects.

You can specify the same item multiple times, this is useful to make the middle point closer to some specific objects.

game_over continue_enabled show_credits

Makes the game stop and show the main menu.

If continue_enabled is false, the continue button is disabled.

If show_credits is true, the credits scene is played.

Il y a une erreur de communication avec le serveur Booktype. Nous ne savons pas actuellement où est le problème.

Vous devriez rafraîchir la page.