When Object Restores
Fires when an unstable object returns to its normal state after breaking or deforming.
Introduction
When Object Restores is an event in the Unstable group of World Events. It fires when an unstable object returns to its normal state after breaking or deforming. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. Use it when you want something to happen automatically as soon as the object restores to its normal state. This event belongs to the Unstable component. Open the Unstable component guide to see everything the component itself can do. Unstable objects break and come back: this event fires when the object recovers, and When Shaking Starts warns players right before it breaks. The final destruction - if the object does not recover - flows into When Destroyed . The restore timer and break effects are configured in the Unstable component guide. When Object Restores event in the World Editor Image The When Object Restores event in the Script Editor. caption
Parameters
None This event has no parameters. The event fires on its own and everything you need is the object running this script. Parameter Description
How to Access
How to Access - Event When Object Restores
How to Use
Select the object, press Propertie (the blue equalizer icon) in the bottom action menu, and scroll to the bottom of the properties panel. Press Add Component and pick the Unstable component; its block stacks below the existing properties with the When Object Restores event inside it. 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 let the shaken object become stable again, then check that the actions run.
Example
When Object Restores: Execute System Environment.3D Bubble show Object Restore at Self, color black, keep 1 second when-object-restores-example.png Shows a 3D bubble marker at the object when it restores to its normal state. caption
Common Uses
Reset puzzles once the platform is whole again Play a repair or rebuild animation Re-enable hazards that were disabled while broken
Tip
Pair it with When Shaking Starts to cover both the warning and the recovery of the same object.