addHook("PlayerThink", function(player) -- Target only the Sonic skin from your Archie sheet if player.mo and player.mo.valid and player.mo.skin == "sonic" then -- ONLY Super Sonic can perform the Dash-Blast if (player.powers[pw_super]) then -- Activation: Hold Custom Button 2 if (player.cmd.buttons & BT_CUSTOM2) then -- 1. Velocity: Surge forward at high speed -- 80 units is fast enough to clear most gaps instantly P_InstaThrust(player.mo, player.mo.angle, 80 * FRACUNIT) -- 2. Animation: Use the 'Super Peel Out' sprites from your sheet -- We force the DASH animation state player.panim = PA_DASH -- 3. The Blast: Destroy Badniks/Projectiles in a 3-block radius (192 units) searchBlockmap("objects", function(sonic, found) if found and found.valid and (found.flags & MF_ENEMY) then if P_AproxDistance(sonic.x - found.x, sonic.y - found.y) < 192*FRACUNIT then P_KillMobj(found, sonic, sonic) -- Spawns the standard 'pop' effect S_StartSound(found, sfx_pop) end end end, player.mo) -- 4. Visual: Blue after-image trail (Ghost effect) if leveltime % 2 == 0 then local ghost = P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_THROWNREDORB) ghost.target = player.mo ghost.sprite = player.mo.sprite ghost.frame = player.mo.frame ghost.angle = player.mo.angle ghost.color = SKINCOLOR_COBALT -- Deep blue trail ghost.fuse = 5 ghost.flags = $|MF_NOGRAVITY|MF_BRIGHT end end end end end)