-- SRB2 Lua Script: Free Sonic Wind Ability (All Forms) addHook("PlayerThink", function(player) -- Only for Sonic skins if not (player.mo and player.mo.valid and player.mo.skin == "sonic") then return end -- Trigger "Sonic Wind" with Custom Button 2 (Free / No Cost) if (player.cmd.buttons & BT_CUSTOM2) and not (player.prevbuttons & BT_CUSTOM2) then -- Play a wind/cyclone sound effect S_StartSound(player.mo, sfx_s3k4b) local radius = 160 * FRACUNIT local segments = 16 -- Visual: Create a spiraling blue wind circle for i = 1, segments do local ang = i * (ANGLE_MAX / segments) local x_off = FixedMul(radius, cos(ang)) local y_off = FixedMul(radius, sin(ang)) -- Use MT_THOK or MT_SPARK for the "wind" particles local wind = P_SpawnMobjFromMobj(player.mo, x_off, y_off, 16*FRACUNIT, MT_THOK) if wind and wind.valid then wind.color = SKINCOLOR_SKY -- Light blue wind wind.flags = $|MF_NOGRAVITY|MF_NOCLIP|MF_SCENERY wind.fuse = 8 -- Fast despawn wind.scale = 3*FRACUNIT -- Make the gusts larger -- Give the wind some upward momentum wind.momz = 5*FRACUNIT end end -- Damage: Hits enemies in a wide circle (300 units) -- No rings are deducted here, making it completely free P_RadiusAttack(player.mo, player.mo, 300*FRACUNIT) end player.prevbuttons = player.cmd.buttons end)