---
title: Target
slug: target
description: This document provides a comprehensive list of variables and events in vpx. Discover the adjustable properties like name, collision, visibility, and more, as well as the available events such as initialization, timer, and hit events. Explore the included 
docTags: 
createdAt: 2019-11-29T05:23:37.000Z
---

## Variables

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

| Call                                 | Detail                                                                                                                                                                               | Example |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| Name(string)                         |                                                                                                                                                                                      |         |
| HasHitEvent(bool)                    | if set a hit event is fired when the ball hits the drop/hit target without animation. An additional dropped/raised event is fired for drop targets after the mesh animation is over. |         |
| Collidable(bool)                     |                                                                                                                                                                                      |         |
| Threshold(float)                     | hit threshold for firing the hit event                                                                                                                                               |         |
| HitThreshold(float)                  |                                                                                                                                                                                      |         |
| Visible(bool)                        |                                                                                                                                                                                      |         |
| Material(string)                     |                                                                                                                                                                                      |         |
| Image(string)                        | texture name                                                                                                                                                                         |         |
| Elasticity(float)                    |                                                                                                                                                                                      |         |
| ElasticityFalloff(float)             |                                                                                                                                                                                      |         |
| Friction(float)                      | 0..1                                                                                                                                                                                 |         |
| Scatter(float)                       |                                                                                                                                                                                      |         |
| Orientation(float)                   | angle to rotate the whole target around the Z axis                                                                                                                                   |         |
| ReflectionEnabled(bool)              | default=true                                                                                                                                                                         |         |
| DisableLighting(bool)                |                                                                                                                                                                                      |         |
| BlendDisableLighting(float)          | 0..1, same as DisableLighting, but can blend between the two extremes                                                                                                                |         |
| BlendDisableLightingFromBelow(float) | 0..1, similar to DisableLighting, but will block light coming from below (e.g. from light elements)                                                                                  |         |
| DropSpeed(float)                     | the speed how fast the drop or hit target will move                                                                                                                                  |         |
| RaiseDelay(int)                      | defines a delay in milliseconds after the dropped target will start to raise to it's normal position                                                                                 |         |
| IsDropped(bool)                      | can only be used for drop targets if the drop target is raised or dropped                                                                                                            |         |
| TimerEnabled(bool)                   | each target has a build-in timer which can be enabled by setting this to 1                                                                                                           |         |
| 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)            |         |
| UserValue(any)                       | can store any user defined value for re-use later-on                                                                                                                                 |         |

## Events

| Event     | Detail | Example |
| --------- | ------ | ------- |
| \_Init    |        |         |
| \_Timer   |        |         |
| \_Hit     |        |         |
| \_Dropped |        |         |
| \_Raised  |        |         |

```javascript
        dispinterface IHitTargetEvents
        {
        properties:
        methods:
                [id(DISPID_GameEvents_Init)]  void Init();
                [id(DISPID_TimerEvents_Timer)]  void Timer();
                [id(DISPID_HitEvents_Hit)]  void Hit();
                [id(DISPID_TargetEvents_Dropped)]  void Dropped();
                [id(DISPID_TargetEvents_Raised)]  void Raised();
        }
```

