SpelunkyFan wiki

objects/oSlider2/step.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.

oSlider2's step event, 16 lines of GML.

if (mouse_check_button(mb_left) and focus){    x = mouse_x-4;    if (x > 144) x = 144;    if (x < 8) x = 8;    y = 184;    global.soundVol = floor(x / 8);    SS_SetSoundVol(global.sndJump, 2000 + 8000 * (global.soundVol/18));}else{    focus = false;    move_snap(8, 8);    y = 184;    global.soundVol = x / 8;}