PDA

View Full Version : Disabling Spindash



Phantom-Blade
August 10th, 2014, 21:37
"We" are having trouble, for "our" SRB2-1 mod, But however we need to disable the spindash. does anyone know how to disable the spindash...?

Lat'
August 10th, 2014, 21:41
Actually, the Spindash SEEMS hardcoded for Sonic, but it's still possible to disable it by messing around with Tails and Knux's header. For Sonic, you should ask in the Mb or something casue I dont think anyone here could help you :/

Sky
August 11th, 2014, 16:46
Lua is the answer.


addHook("ThinkFrame", do
for player in players.iterate
if player.mo
and (player.pflags & PF_STARTDASH)
player.mo.state = S_PLAY_STND
player.pflags = $1 & ~PF_STARTDASH
end
end
end)

That should do it.

Phantom-Blade
August 12th, 2014, 19:45
Is there also a way to make a single character don't spindash as well?

Demnyx Onyxfur
August 12th, 2014, 20:17
Using Sky's code:


addHook("ThinkFrame", do
for player in players.iterate
if player.mo and player.mo.skin == "SKIN NAME HERE"
and (player.pflags & PF_STARTDASH)
player.mo.state = S_PLAY_STND
player.pflags = $1 & ~PF_STARTDASH
end
end
end)
Just add the underlined part. This will prevent the character with the respective skin name to be unable to spin dash.

If we use this:

addHook("ThinkFrame", do
for player in players.iterate
if player.mo and player.mo.skin == "tails"
and (player.pflags & PF_STARTDASH)
player.mo.state = S_PLAY_STND
player.pflags = $1 & ~PF_STARTDASH
end
end then only Tails will be unable to use the Spin Dash.

EcoloTheHeroOfSega
January 21st, 2018, 15:12
maybe ​ can use this.