Did a little rewrite to this script
one line for the moment.
keep in mind im still not good in luada little rewrite:P_NukeEnemies(skin inflictor, skin source, fixed_t radius)
I'm a begginner
P_NukeEnemies
takes, in order:mobj_t
to skin
.soooooo i have to do this:TheP_NukeEnemies
takes, in order:
- An inflictor as a mobj, as in "what is the object that caused the nuke?"
- A source as a mobj, as in "what is the object that fired the inflictor?"
- A radius as a fixed-point number, as in "how far can the attack reach?"
Inflictor and source may be the same mobj, if for example a player causes the nuke.
All you did was just changemobj_t
toskin
.
Lua has no idea what does that mean.
P_NukeEnemies(player, 10*FRACUNIT )
yehhhh you may have to do the thok.I pressed all three custom buttons and it doesn't work.
The first one is with The second one is with And the third one is obviously
Custom 1. Custom 2. with Custom 3.
Okyehhhh you may have to do the thok.
ok, through looking through the hyper abilities code, ive redid the code.okey heres the thing redid version.
i expect there to be error messages in the console.
soooooo i have to do this:
Lua:P_NukeEnemies(player, 10*FRACUNIT )
so the player is the mobj right ?
and the radius i just have to put a number, then *FRACUNIT right ?
also, im confused to where to put the missing end at.
player
here is a variable of type player_t
, but you need a variable of type mobj_t
. And not only just that, but you need two of them at the start.end
for every function
/if
/for
/while
/repeat
/(others?) in your script.function
, a for
and one if
.end
s: one for the first function
and another for the for
.if
end, and it won't do what you want.G_PlatformGametype
is still a function. You should be calling it: G_PlatfomGametype()
ThinkFrame
. That works!mo
field. You should probably check that the player does indeed have a mo
before trying to use it.for the v1.3, press c1 to do the blast. i fixed alot of things now.Still don't work.
--Super Abilities by ZxyroGaming(Arch)
--Note, some scripts require VL_super-v4.lua since some skins cant transform.
--Thanks to RapidGame7 for helping me out through some stuff. I would never have gotten this far without him.
--Super Sonic Chaos Burst
addHook("ThinkFrame", function(player)
if player.mo and player.mo.skin == "sonic"
and player.powers [pw_super]
and (player.cmd.buttons & BT_CUSTOM1)
and G_PlatformGametype() then
P_NukeEnemies(player.mo, player.mo, 2048*FRACUNIT)
P_GivePlayerRings (player.mo, player, -10)
P_Earthquake(player.mo, player.mo, 2048*FRACUNIT)
end
end)
--Super Sonic Nuke Thok
addHook("AbilitySpecial", function(player)
if player.mo and player.mo.skin == "sonic"
and player.powers[pw_super]
and not player.pflags & PF_THOKKED then
P_NukeEnemies(player.mo, player.mo, 2048*FRACUNIT)
S_StartSound(player.mo, sfx_zoom)
end
end)
--A G G R E S I V E T R A N S F O R M A T I O N
--hes so powerful he causes a earthquack quack.
--hey have you ever thought: how powerful would knuckles be if he was in his super form ?
addHook("ThinkFrame", function(player)
if player.mo and player.mo.skin == "knuckles"
and player.powers[pw_super]
and (player.cmd.buttons & BT_CUSTOM2)
and not P_IsObjectOnGround(player) then
P_DoSuperTransformation(player.mo)
P_Earthquake(player.mo, player.mo, 1000*FRACUNIT)
P_StartQuake(1000*FRACUNIT, 2*TICRATE)
end
end)