logo

Babylon.js Market

By Lawrence

5 minutes

Catching up?

Dropping in at this lesson? One command reinstalls the library components the build uses so far and writes the scene as it stood at the end of the previous lesson to public/scenes/WingmanFlight-lesson-6/scene.json:

bjs download scene WingmanFlight-lesson-6 --all

Copy that scene.json over your src/scenes/wingman.json and you are caught up to the start of this lesson.

The game already announces every big moment. So far, nothing is listening. Kill an enemy and wingman.enemy.killed goes out. Nothing hears it. Fly into a rock and die, and wingman.player.killed goes out too. Still nothing. The freighter you guard takes a fatal hit, or the gate track finishes. That fires wingman.freighter.killed or wingman.track.completed. No one is listening to those either. Five lessons of events, and nothing catches them. This lesson adds the one listener that reads those four events. It decides the run: won or lost.

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search