Thok Ability Refresh on the fly?

SnoozyBoi

Member
So, another thing I wanted to do with lua scripting was try to make it so When you bounce off of a spring, object or enemy, your midair ability (in this case CA_DOUBLEJUMP) is "recharged" so you can chain them together. I had found and tried using the object flag MFE_SPRUNG as a base but it only seemed to affect local variables for custom moves (candive) and not the jump move.
attached is the code I wrote for this, but I'm sure it would need to be broader in scope than what I've already written.

Screenshot 2022-09-11 103616.png


If anyone can figure out what flags I would need to swap around, lemme know! I'm learning lua fairly quickly but there's a bunch of small stuff im still working out.
(also, thought this might be important, the player has SF_NOJUMPSPIN as well, and I haven't implemented jumping frames so the spring frames are standing in)
 
So, another thing I wanted to do with lua scripting was try to make it so When you bounce off of a spring, object or enemy, your midair ability (in this case CA_DOUBLEJUMP) is "recharged" so you can chain them together. I had found and tried using the object flag MFE_SPRUNG as a base but it only seemed to affect local variables for custom moves (candive) and not the jump move.
attached is the code I wrote for this, but I'm sure it would need to be broader in scope than what I've already written.

View attachment 76194

If anyone can figure out what flags I would need to swap around, lemme know! I'm learning lua fairly quickly but there's a bunch of small stuff im still working out.
(also, thought this might be important, the player has SF_NOJUMPSPIN as well, and I haven't implemented jumping frames so the spring frames are standing in)
Lua:
$ & PF_THOKKED
would make it so that the Thok ISN'T usable afer you have used a spring. You need to do
Lua:
$ & ~PF_THOKKED
.

You'd need to also do:
Lua:
player.pflags = $ & PF_JUMPED
So that it registers you as jumping so you can do the Thok.
 
I had no idea the PF_JUMPED flag came with that little extra feature! Will it still play the jumping noise?
Post automatically merged:

I had no idea the PF_JUMPED flag came with that little extra feature! Will it still play the jumping noise?
Turns out that this didn't affect anything, rather, it just puts me into auto-strafe. How odd.

ezgif.com-gif-maker (1).gif

(sorry for the crusty ass gif, It was too big.)
in this gif i'm pressing jump off the spring, but it locks the player into strafing until I go into first-person and out again.
 
Last edited:

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top