Page 1 of 1

Freeze Highlights (for emphasis)

Posted: Mon Dec 21, 2020 2:37 am
by Emral
https://drive.google.com/file/d/18NA8n9 ... sp=sharing

Image

Little library from Subzero Heroes that lets you add a short time freeze for emphasis when, for example, hitting an enemy with a powerful attack.

Usage example is in the file. It's not much more than a single line of code. There's also a getter function if you wanna check for when a timefreeze is active.

Re: Freeze Highlights (for emphasis)

Posted: Fri May 20, 2022 1:23 pm
by ditditdit
really think this lloks cool.

Re: Freeze Highlights (for emphasis)

Posted: Sun May 29, 2022 7:32 am
by IttaBaby
So is there a simpler way to make it only happen during an enemy kill and not every time anything despawns for any reason including every coin collected and every time a projectile goes of screen?

Re: Freeze Highlights (for emphasis)

Posted: Sun May 29, 2022 8:11 am
by Emral
IttaBaby wrote:
Sun May 29, 2022 7:32 am
So is there a simpler way to make it only happen during an enemy kill and not every time anything despawns for any reason including every coin collected and every time a projectile goes of screen?
Yes! You can call the freeze.set() function whenever you need to. You don't have to use the condition-less onPostNPCHarm-example from the file. For enemy kills, make sure to use the parameters for onPostNPCKill and filter out harmType 9 (despawn) with an if statement. You can also filter for IDs with the killedNPC paramter:
https://docs.codehaus.moe/#/reference/lunalua-events

example: this one only freezes when an npc was killed with a JUMP
function onPostNPCKill(killedNPC, killReason)
if killReason == HARM_TYPE_JUMP then
freeze.set(10)
end
end

Re: Freeze Highlights (for emphasis)

Posted: Thu Oct 05, 2023 10:05 pm
by lugiaTheAntarticLord
Ow my eyes

Re: Freeze Highlights (for emphasis)

Posted: Mon May 12, 2025 3:52 pm
by Pjerun
perfect for some kind of critical hit. Or dealing a final blow to a boss!