Looting! Module overview
- Detect mouse input with Area2D nodes: The mouse entering and exiting the area, and clicking over the area. You will reuse this in mobile games, point-and-click adventures, RPGs, and more.
- Use a provided shader asset and change its values to show the chest is interactable on hover.
- Use "onready" variables to store references to nodes.
- Use the
@export
annotation to export script variables to the Inspector and easily change their value.
- The
_input_event()
function Godot provides to check clicks over collision shapes. - The
mouse_entered
andmouse_exited
signals to know when the cursor enters or leaves an area.
Tweens are code-driven animations we use to change a value over time.Tween Glossary Entry
Download the project files
Files not accessible
Looks like you don't own this course. Get it now.
Open and review the workbook for this module



Will we learn to make environments like this in the course?Yes! Later in the course, we will have lessons dedicated to setting up a tileset and using it to draw your own level. We limit the number of concepts taught in each module to spread the load and build important gamedev and Godot concepts on top of one another. That's why tilesets and tilemaps will come later.

mini_dungeon.tscn
scene file. It's the project's main scene, the scene that runs when pressing f5 (on Mac: ⌘b), which is open in the viewport by default. You will also find two directories for the chest and the items.group_outline.gdshader
. This shader draws an outline around sprites, and we'll see how to use it in the next lesson.

Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.