SuperMarineWorld
Sumawu
I've tried giving a shot at making a multiple-use midair dash ability for an SRB2 character I'm making, but the script wouldn't work, even with the methods I've tried.
The LUA I've made in question:
When the addon is loaded, this warning appears on the console:
If anyone has a solution to fixing up the code to make it work, it would be greatly appreciated.
The LUA I've made in question:
//Hammer Leap
addHook("AbilitySpecial", function(player)
if player.mo.skin == "foof"
if player.pflags&PF_THOKKED
return false
end
local actionspd = FixedMul(player.mo.scale*12)
if player.mo.eflags & MFE_UNDERWATER
actionspeed = $/3
end
P_Instathrust(player.mo, player.mo.angle, actionspeed*2)
P_SetObjectMomZ(player.mo*10/FRACUNIT, true)
end
end)
addHook("AbilitySpecial", function(player)
if player.mo.skin == "foof"
if player.pflags&PF_THOKKED
return false
end
local actionspd = FixedMul(player.mo.scale*12)
if player.mo.eflags & MFE_UNDERWATER
actionspeed = $/3
end
P_Instathrust(player.mo, player.mo.angle, actionspeed*2)
P_SetObjectMomZ(player.mo*10/FRACUNIT, true)
end
end)
When the addon is loaded, this warning appears on the console:
WARNING: ...rcade/SRB2 v2.2/addons/Characters/CL_Foof_Test.pk3|Lua/FoofAbilities.lua:13: ')' expected near '10'
If anyone has a solution to fixing up the code to make it work, it would be greatly appreciated.