objects/oCredits2/alarm_1.gml
From spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC, shown whole under the Spelunky User License v1.1b. Extracted by spelunky.ai's tools, an unofficial fan project, one file per script or event; the // ==== lines are the extractor's, naming each action of the event. Some scripts are others' work that Derek Yu credits in the source's readme.txt: Martin Piecyk's platform engine, ChevyRay's view scaling scripts and tsg1zzn's Super Sound System.
oCredits2's alarm 1 event, 16 lines of GML.
if (scrolling){if (rand(1,8) == 1) instance_create(-16, 176, oShrubScroll);else if (rand(1,12) == 1) instance_create(-32, 176-112, oPalmTreeScroll);instance_create(-16, 176, oDesertTopScroll);instance_create(-16, 192, oDesertScroll2);instance_create(-16, 208, oDesertScroll);instance_create(-16, 224, oDesertScroll);with oDesertScroll { scroll = true; }with oDesertScroll2 { scroll = true; }with oDesertTopScroll { scroll = true; }with oShrubScroll { scroll = true; }with oPalmTreeScroll { scroll = true; }alarm[1] = 16;}