Learn GSC › Easter egg course

Script your own Easter egg

Triggers, flags and a step runner, then pick the steps you want: shootables, a soul box, a code puzzle, a race against the clock and more. Every lesson runs in a pretend zombies map, right here.

Your progress 40 XP per lesson
0 / 18 lessons
Progress saves in this browser and counts towards your modding career.
Loading...

Your task
zm_lesson.gsc
Ctrl+Enter runs
Output
Press Run to see what your code prints.
What's in the course

18 lessons, from your first trigger to a finished Easter egg

Unit 1 · Start here

Plan & wire up

  1. Designing an Easter eggSteps, feedback, and what can go wrong in solo and co-op.
  2. Finding things from Radianttargetname KVPs, getEnt, getEntArray and struct::get.
  3. Triggers: press to interactHint strings, waittill("trigger", player) and one-time triggers.
  4. Flags: remembering progressflag::init, set and wait_till, and why waittill can miss things.
  5. The step runnerA list of step functions run in order: the modular backbone.
Unit 2 · Pick any, in any order

Step modules

  1. Collect the partsFind every piece scattered round the map.
  2. ShootablesDamage triggers, means of death and counting each one once.
  3. Soul boxZombie death callbacks and distance checks.
  4. Code puzzleButtons in the right order, with a reset.
  5. Beat the clockA timer thread cancelled with endon.
  6. Wait for a roundSteps that only open up from a certain round.
  7. Carry & placePick a part up and bring it somewhere.
Unit 3

Feedback & polish

  1. Moving the worldmoveZ, rotateYaw, movedone and deleting things.
  2. Feedback: sounds, hints & progressplaySound, hide, show and the big moments.
  3. Co-op, solo & things that breakDouble presses, lost items and loops that never end.
Unit 4

Reward & ship it

  1. The rewardPoints for everyone, power-up drops and weapons.
  2. Project: your own Easter eggCombine three or more modules into your own Easter egg.
  3. Putting it in your mapYour own .gsc file, the zone file, Radiant and testing.

The pretend map knows the real BO3 functions these lessons use (getEnt, setHintString, flag::, struct::get, moveZ, zombie death callbacks, power-up drops), so what you write here is the same GSC you'll put in your map. Stuck? Ask on Discord or check the GSC reference.