When critical hit happens
Fires when a shot lands as a critical hit.
Introduction
When Critical Hit Happens is an event in the Ranged Weapon group of World Events. It fires when a shot 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 crown the lucky shot: a louder crack, a golden tracer, or an announcement that the player just landed a crit. This event belongs to the Ranged Weapon component. Open the Ranged Weapon component guide to see everything the component itself can do. Criticals are the spice of combat: this event picks the special shots out of the normal flow of When Weapon Fires and When Bullet Hits , and the same mechanic exists for melee in When Melee Critical Hit . Critical chance and bonus damage are configured in the Ranged 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 ranged 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 ranged weapon, then check that the actions run.
Example
When critical hit happens: Set Self Ranged Weapon.Bullet Damage Add 1 when-critical-hit-happens-example.png Raises the weapon's bullet damage by 1 whenever a shot lands as a critical hit. caption
Common Uses
Distinct critical sounds and flashes Bonus reward triggers Critical streak trackers
Tip
Criticals also fire the regular hit events. Layer the critical reactions on top rather than replacing the normal ones.