How can I make a custom Homing Thok?

I want to make a custom variant of the Homing Thok, but I don't know the keywords to Make movement, let alone a Lock-on System.

Is there something like a Tutorial or Guide on custom lua abilities, pertaining more specifically to Lock-on and Momentum?
(and I mean more extensive and detailed than that Gravity Flip thing on the wiki.)
 
Last edited:
I want to make a custom variant of the Homing Thok, but I don't know the keywords to Make movement, let alone a Lock-on System.

Is there something like a Tutorial or Guide on custom lua abilities, pertaining more specifically to Lock-on and Momentum?
(and I mean more extensive and detailed than that Gravity Flip thing on the wiki.)
I'm pretty sure you have to do some "charability" shenanigans with code, because there's already a homing thok accessible in game with devmode turned on by using "charability 1 4" in the console.
oh wait, i think you're talking about making a homing attack with a custom lock on and trail and all that. in that case, i'm not sure, sorry.
 
Last edited:
oh wait, i think you're talking about making a homing attack with a custom lock on and trail and all that.

Basically, Yes. The idea is to stop right in-front of a badnik and perform a melee attack à la Shadow in 06. (or at least come in from above, ether or.)
A bit ambitious I'm sure but it would be fun I think.

On a side note, I also want to know how to do a TwinSpin attack off the Spin Button in air, while having the Custom Homing Thok on the Jump Button
 
On a side note, I also want to know how to do a TwinSpin attack off the Spin Button in air, while having the Custom Homing Thok on the Jump Button
Make your charability CA_TWINSPIN. It works with spin, and for the homing just check if the player pressed Jump. This'll separate 'em.
 
Make your charability CA_TWINSPIN. It works with spin, and for the homing just check if the player pressed Jump. This'll separate 'em.

So I tried to make button checks, but as the amateur I am, I can't get it to work.

addHook("AbilitySpecial", function(player)
if (player.mo and player.mo.skin == "WIP")
if not P_IsObjectOnGround(player.mo)
and (player.pflags & PF_JUMPED)
if (player.cmd.buttons & BT_JUMP)
and not (player.pflags & PF_JUMPDOWN)
if not P_LookForEnemies(player)
player.charability = CA_JUMPTHOK
player.actionspd = 20*FRACUNIT
thokitem = MT_THOK
else
player.charability = CA_HOMINGTHOK
player.actionspd = 50*FRACUNIT
thokitem = MT_NULL
end
elseif (player.cmd.buttons & BT_SPIN)
and not (player.pflags & PF_SPINDOWN)
player.charability = CA_TWINSPIN
player.actionspd = 10*FRACUNIT
else
player.charability = CA_TWINSPIN
player.actionspd = 10*FRACUNIT
end
else
player.charability = CA_TWINSPIN
player.actionspd = 10*FRACUNIT
end
end
end)
(this somehow almost randomizes CA1)
Any tips on fixing it?
 
Basically, Yes. The idea is to stop right in-front of a badnik and perform a melee attack à la Shadow in 06. (or at least come in from above, ether or.)
A bit ambitious I'm sure but it would be fun I think.

On a side note, I also want to know how to do a TwinSpin attack off the Spin Button in air, while having the Custom Homing Thok on the Jump Button
Well, a tip that might work. You might wanna check out the scripts used in the Modern Sonic mod and Werehog mod. They both have homing attacks.
Then you might be able to branch off of there.
 
Well, a tip that might work. You might wanna check out the scripts used in the Modern Sonic mod and Werehog mod. They both have homing attacks.
Then you might be able to branch off of there.

I would like to, but from what I understand,(I could easily be wrong here but), I think that counts as "Data Mining" (or something?) and is an at least Heavily frowned upon(if not Banable) offence without written consent from the original creator, thus all I've learned ts construed from strictly 'Reusable' mods, and to a lesser extent the wiki. (that thing is so out of date.)
 
Last edited:
I would like to, but from what I understand,(I could easily be wrong here but), I think that counts as "Data Mining" (or something?) and is an at least Heavily frowned upon(if not Banable) offence without written consent from the original creator, thus all I've learned ts construed from strictly 'Reusable' mods, and to a lesser extent the wiki. (that thing is so out of date.)
Yeah, thought so. It was just the last thing I thought of, sorry again.
 
I would like to, but from what I understand,(I could easily be wrong here but), I think that counts as "Data Mining" (or something?) and is an at least Heavily frowned upon(if not Banable) offence without written consent from the original creator, thus all I've learned ts construed from strictly 'Reusable' mods, and to a lesser extent the wiki. (that thing is so out of date.)
You can use non-reusable and reusable mods as a refrence, but you cannot take the lua.
 

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

Back
Top