---
title: Trigger
slug: trigger
description: Learn about variables, methods, and events in VPX with this comprehensive document. Explore properties like name, position, and timer settings, as well as various procedures and actions you can execute. Discover the events available, including initializat
docTags: 
createdAt: 2019-11-29T05:22:06.000Z
---

## Variables

*Variables are items in vpx you can set, adjust or call.*

| Call                  | Detail                                                                                                                                                                          | Example |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| Name(string)          |                                                                                                                                                                                 |         |
| X(float)              |                                                                                                                                                                                 |         |
| Y(float)              |                                                                                                                                                                                 |         |
| Radius(float)         |                                                                                                                                                                                 |         |
| TimerEnabled(bool)    |                                                                                                                                                                                 |         |
| TimerInterval(int)    | set interval for triggering the timer (1 equals 1000 timer calls per second, 1000 equals 1 timer call per second, -1 makes it dependent on the FPS that a user can reach)       |         |
| Enabled(bool)         |                                                                                                                                                                                 |         |
| Visible(bool)         |                                                                                                                                                                                 |         |
| TriggerShape(Shape)   | 0=None, 1=Wire, 2=Star                                                                                                                                                          |         |
| Surface(string)       |                                                                                                                                                                                 |         |
| UserValue(any)        |  - can store any user defined value for re-use later-on                                                                                                                         |         |
| HitHeight(float)      |                                                                                                                                                                                 |         |
| Rotation(float)       |                                                                                                                                                                                 |         |
| AnimSpeed(float)      |                                                                                                                                                                                 |         |
| WireThickness(float)  | This option is only used for wire shape triggers. The thickness is a factor to scale the wire 0=normal thickness(default). To make it thicker use values like 0.5, 1, 1.5, 2... |         |

## Methods

*Methods are procedures or actions that you can fire in VPX.*

| Call                    | Detail | Example |
| ----------------------- | ------ | ------- |
| BallCntOver(int value)  |        |         |
| DestroyBall(int ballId) |        |         |

## Events

| Event   | Detail | Example |
| ------- | ------ | ------- |
| \_Init  |        |         |
| \_Timer |        |         |
| \_Hit   |        |         |
| \_Unhit |        |         |

```javascript
        dispinterface ITriggerEvents
        {
        properties:
        methods:
                [id(DISPID_GameEvents_Init)]  void Init();
                [id(DISPID_TimerEvents_Timer)]  void Timer();
                [id(DISPID_HitEvents_Hit)]  void Hit();
                [id(DISPID_HitEvents_Unhit)]  void Unhit();
        }
```

