That's what I've been doing, but the problem is the thing I'm working on relies on the fact that you only have 1 HP, also I want the character to die when they hit the ground too hard or something like that, is that even possible with lua though?
Well, if the character has only 1 HP, then how can they take any falling damage without dying?
For the second, you could try to use the JumpSpinSpecial hook to overwrite that ability when super. Not sure if it'll work, but worth a shot.
addHook("ThinkFrame", do
for player in players.iterate
if player.mo.skin == "sonic"
player.ability2 = CA2_NONE
if (player.cmd.buttons & BT_USE)
"A_Boss1Laser(MT_LASER)"
end
end
end
end)
Exactly. MT_LASER is just a simple number. You should replace MT_LASER with the player's object, so it should look something like this:clearly this script has no numbers in it, except MT_LASER
addHook("MobjThinker", function(playermobj)
local player = playermobj.player
if playermobj.skin == "sonic"
player.ability2 = CA2_NONE
if player.cmd.buttons & BT_USE
A_Boss1Laser(playermobj)
end
end
end, MT_PLAYER)