When Critical Hit Happens (Melee Weapon)
Fires when a swing lands as a critical hit.
Introduction
When Critical Hit Happens is an event in the Melee Weapon group of World Events. It fires when a swing lands as a critical hit. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. Use it to make criticals feel special: bigger sparks, a deeper boom, or a slow-motion flourish on the lucky strike. This event belongs to the Melee Weapon component. Open the Melee Weapon component guide to see everything the component itself can do. The perfect strike: this event filters the strongest hits out of When Melee Used and When Melee Hit , mirroring the ranged mechanic in When Critical Hit Happens . Critical chance and multiplier settings are found in the Melee Weapon guide. When Critical Hit Happens event in the Uni editor Image The When Critical Hit Happens event in the Script Editor.
Parameters
Object the object that took the critical hit Parameter Description
How to Access
How to Access - Event When Critical Hit Happens
How to Use
Select the weapon in the right panel , then click its Propertie (the blue equalizer icon) and scroll to the bottom of the properties panel — the When Critical Hit Happens event is already listed there. Press the + button below the event to add a script, then press Edit on that script to open the script editor and build the actions that should run when the event fires. Press Play and land a critical hit with the melee weapon, then check that the actions run.
Example
When critical hit happens: Execute Self Melee Weapon.Current Prop Holder.Character.Controlling Player.UI.Show Toast CRITICAL!!! when-melee-critical-hit-example.png Shows a "CRITICAL!!!" toast to the holder's player whenever a swing lands as a critical hit. caption
Common Uses
Flashy critical-only effects Bonus sounds or announcements Grant bonus loot on criticals
Tip
Criticals also fire When Weapon Hits. Connect effects to both and let the critical version add the extra layer on top.