marcxworld
avid enjoyer of rvz, currently trying to get 1:12
I'll just cut to the chase: I have some lua borrowed over from frostiikin for a spring recurl, and while I understand pretty much everything else in this code I just can't for the life of me figure out how to get the code to not work for other characters.
like, I've tried a lot too, I moved the second hook to the second if statement, between the states and validity, didn't work. I removed the return statement, didn't work, I made a whole new hook, didn't work. I genuinely have zero clue what to do and while the answer is probably simple it's engraved in ruins. Thing is, I can deactivate the function, I just don't know how to only deactivate it for certain characters. I'm so confused here, what am I missing???
Ok.. I look pretty silly now, but apparently I mistyped sms' name by putting it in all caps, lol. well that's embarrassing... I dunno if I can delete a thread but I really want to now...
Lua:
//Frostiikin was here.
addHook("PlayerThink", function recurl(p)
p.recurl = true
if p.mo and p.mo.valid and (p.cmd.buttons & BT_USE) and not (p.pflags & PF_SHIELDABILITY) and (p.charability2 == CA2_SPINDASH)
if p.mo.state == S_PLAY_SPRING
or p.mo.state == S_PLAY_FALL
p.mo.state = S_PLAY_JUMP
p.pflags = $ |(PF_JUMPED)
p.pflags = $ & ~(PF_NOJUMPDAMAGE)
S_StartSound(p.mo, sfx_zoom)
end
end
end)
addHook("PlayerThink", function(p)
if p.mo.skin == "SMS" or "xsonic" then
p.recurl = false
return
end
end)
Post automatically merged:
Ok.. I look pretty silly now, but apparently I mistyped sms' name by putting it in all caps, lol. well that's embarrassing... I dunno if I can delete a thread but I really want to now...
Last edited: