Void Animates
Just a guy who loves... EVERYTHING!
nvm... I had to add if player.target before homing attack...
Lua:a [CODE=lua]ddHook("PlayerThink",function(player,target) if player.mo.skin == "lightsonic" player.target = P_LookForEnemies(player) if not P_IsObjectOnGround(player.mo) and not (player.pflags & PF_THOKKED) if player.target P_SpawnLockOn(player,player.target,S_LOCKON1) end end end end) addHook("AbilitySpecial",function(player) if player.mo.skin == "lightsonic" and not (player.pflags & PF_THOKKED) and player.target and not P_IsObjectOnGround(player.mo) P_HomingAttack(player.mo, player.target) P_Thrust(player.mo, player.mo.angle,30*FRACUNIT) player.mo.state = S_PLAY_THOK S_StartSound(player.mo,sfx_thok) -- the sound, u can change it if u want --a effect! P_SpawnMobj(player.mo.x - 30*FRACUNIT, player.mo.y, player.mo.z - 30*FRACUNIT, MT_SPINDUST) P_SpawnMobj(player.mo.x + 30*FRACUNIT, player.mo.y , player.mo.z - 30*FRACUNIT, MT_SPINDUST) P_SpawnMobj(player.mo.x - 30*FRACUNIT, player.mo.y ,player.mo.z +30*FRACUNIT, MT_SPINDUST) P_SpawnMobj(player.mo.x + 30*FRACUNIT, player.mo.y, player.mo.z + 30*FRACUNIT, MT_SPINDUST) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z + 35*FRACUNIT, MT_SPINDUST) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z - 35*FRACUNIT, MT_SPINDUST) P_SpawnMobj(player.mo.x + 35*FRACUNIT, player.mo.y, player.mo.z, MT_SPINDUST) P_SpawnMobj(player.mo.x - 35*FRACUNIT, player.mo.y, player.mo.z, MT_SPINDUST) player.pflags = $|PF_THOKKED end end)
"lightsonic"
, otherwise Lua thinks you're trying to numerically invert a word.ok copy again the codeit still doesn't work..
//Sword spin
addHook("PlayerThink", function(player)
if player.mo.skin == "blackknight"
if not P_IsObjectOnGround(player.mo)
and (player.cmd.buttons & BT_CUSTOM2) then
P_SpawnMobjFromMobj(p.mo,0,0,0,MT_THOK)
S_StartSound(player.mo, sfx_spin)
player.mo.momz = -23*FRACUNIT
player.mo.state = S_PLAY_ROLL
end
end
end)
addHook("AbilitySpecial",function(player,target)
if player.mo.skin == "sonic"
player.target = P_LookForEnemies(player, true, true)
if player.mo.state = S_PLAY_JUMP and (player.pflags & PF_THOKKED)
if player.target
P_HomingAttack(player.mo, player.target)
P_Thrust(player.mo, player.mo.angle,10*FRACUNIT)
player.mo.state = S_PLAY_HOMING
player.pflags = $|PF_THOKKED
end
end
end
end)
addHook("PlayerThink",function(player,target)
if P_LookForEnemies(player) and not P_IsObjectOnGround(player.mo) and not (player.mo.eflags & MFE_SPRUNG or player.pflags & PF_THOKKED)
P_SpawnLockOn(player, P_LookForEnemies(player), S_LOCKON1)
end
end)
Not sure if you already know but there’s already a homeing thok you can use. Totally fine if you wanna make your own thoi am trying to script a homing attack but its not working,, can anyone help?
Lua:addHook("PlayerThink",function(player,target) if player.mo.skin == "sonic" player.target = P_LookForEnemies(player, true) if not P_IsObjectOnGround(player.mo) and if player.target and if player.mo.state = S_PLAY_THOK P_HomingAttack(player.mo, player.target) P_Thrust(player.mo, player.mo.angle,30*FRACUNIT) player.mo.state = S_PLAY_JUMP end end end end)
player.pflags = player.pflags | PF_THOKKED will stop the player from activating "AbilitySpecial" again in the same jump, but given this is a playerthink one make it check for player.pflags == player.pflags | PF_THOKKED and if true, return (return with no value at the end stops execution of the function)Hi
Umm how do I make it so I don't do an ability after I do it? So its not OP
How do banned people do that?Not sure if you already know but there’s already a homeing thok you can use. Totally fine if you wanna make your own tho
he means like the game already has a homing attackHow do ban
How do banned people do that?