---
title: Kicker
slug: kicker
description: Learn about the essential variables, methods, and events encompassing kickers in VPX with this informative document. Discover how variables like name, position, draw style, and color affect their behavior. Explore various methods to create, kick, and trac
docTags: 
createdAt: 2019-11-29T05:20:03.000Z
---

## Variables

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

| Call                  | Detail                                                                                                                                                                    | Example |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| Name(string)          |                                                                                                                                                                           |         |
| X(float)              |                                                                                                                                                                           |         |
| Y(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)         |                                                                                                                                                                           |         |
| DrawStyle(KickerType) | 0=Hidden, 1=Hole, 2=Cup, 3=Invisible                                                                                                                                      |         |
| Color(OLE\_COLOR)     |                                                                                                                                                                           |         |
| Surface(string)       | surface this kicker is attached to                                                                                                                                        |         |
| UserValue(any)        | can store any user defined value for re-use later-on                                                                                                                      |         |
| Scatter(float)        |                                                                                                                                                                           |         |
| Fall Through(bool)    | if checked the ball will fall through the surface assigned to the kicker.   Can be used to fake holes in the PF if not using the primitive playfields in 10.6+.           |         |
| Legacy(bool)          | if checked the kicker will behave as an old VP9 kicker that means no distraction of the ball if it doesn't hit straight the kicker center                                 |         |
| HitAccuracy(float)    | defines the accuracy how fast the ball gets caught when rolling over the kicker center (0.0-1.0)                                                                          |         |
| HitHeight(float)      |                                                                                                                                                                           |         |
| Orientation(float)    |                                                                                                                                                                           |         |
| Radius(float)         |                                                                                                                                                                           |         |
| LastCapturedBall      | returns an instance to the last captured ball or the current captured ball. If no ball was captured before or was destroyed before an error message will be displayed.    |         |

## Methods

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

| Call                                                                            | Detail | Example |
| ------------------------------------------------------------------------------- | ------ | ------- |
| CreateBall()                                                                    |        |         |
| CreateSizedBall(float radius)                                                   |        |         |
| CreateSizedBallWithMass(float radius, float mass)                               |        |         |
| Kick(float angle, float speed, float inclination)                               |        |         |
| KickXYZ(float angle, float speed, float inclination, float x, float y, float z) |        |         |
| KickZ(float angle, float speed, float inclination, float heightz)               |        |         |
| BallCntOver(int)                                                                |        |         |

## Events

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

```javascript
        dispinterface IKickerEvents
        {
        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();
        }
```

