When Pressing the Pedal
Fires when the pedal changes to the pressed down state.
Introduction
When Pressing the Pedal is an event in the Pedals group of World Events. It fires when the pedal changes to the pressed down state. When it fires, the event hands one value to your script: Object, the object that stepped on the pedal. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. This event belongs to the Pedal component. Open the Pedal component guide to see everything the component itself can do. Pedals control the rhythm of a drive: this event fires while a pedal is pushed, When Releasing the Pedal catches the let-go, and the result shows up as When Speed Up . The whole driving session is bracketed by When Player Gets On and When Player Gets Off , and pedal sensitivity is configured through the Vehicle Asset guide. When Pressing the Pedal event in the World Editor Image The When Pressing the Pedal event in the Script Editor. caption
Parameters
Object the object that triggered the pedal Parameter Description
How to Access
How to Access - Event When Pressing the Pedal
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 Pedals component; its block stacks below the existing properties with the When Pressing The Pedal 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 step onto the pedal, then check that the actions run.
Example
When pressing the pedal by Object in Event: Set Group.Is Active Change To True when-pressing-the-pedal-example.png Reveals a hidden platform by activating its group while the pedal is pressed. caption
Common Uses
Reveal a hidden bridge or platform while the pedal is held down Open a gate or start a machine the moment the pedal is stepped on Start a trap or alarm when an intruder steps on the plate
Tip
This event fires on the state change itself, not while the pedal stays held. Start effects here and stop them with When Releasing the Pedal.