Primitive
Variables are items in vpx you can set, adjust or call.
Call | Detail | Example |
---|---|---|
Name(string) |  |  |
Sides(float) | amount of sides for the old standard primitive |  |
TopVisible(bool) | toggle visibility |  |
TopColor(OLE_COLOR) | topColor of the old standard primitive (only valid if no image was set) |  |
SideColor(OLE_COLOR) | sideColor of the old standard primitive (only valid if no image was set) |  |
DrawTexturesInside(bool) | textures the inside of the old standard primitive |  |
Image(string) | texture name |  |
NormalMap(string) | normal map name |  |
X(float) | X position |  |
Y(float) | Y position |  |
Z(float) | Z position |  |
Size_X(float) | X size |  |
Size_Y(float) | Y size |  |
Size_Z(float) | Z size |  |
RotAndTra0(float) or RotX(float) | rotates the primitive around it's X axis |  |
RotAndTra1(float) or RotY(float) | rotates the primitive around it's Y axis |  |
RotAndTra2(float) or RotZ(float) | rotates the primitive around it's Z axis |  |
RotAndTra3(float) or TransX(float) | translates the primitive along it's X axis |  |
RotAndTra4(float) or TransY(float) | translates the primitive along it's Y axis |  |
RotAndTra5(float) or TransZ(float) | translates the primitive along it's Z axis |  |
RotAndTra6(float) or ObjRotX(float) | rotates the X axis of the primitive's local coordinate system. This is used to orientate the object first, after that RotXYZ will rotate the object around this rotated coordinate system |  |
RotAndTra7(float) or ObjRotY(float) | rotates the Y axis of the primitive's local coordinate system. This is used to orientate the object first, after that RotXYZ will rotate the object around this rotated coordinate system |  |
RotAndTra8(float) or ObjRotZ(float) | rotates the Z axis of the primitive's local coordinate system. This is used to orientate the object first, after that RotXYZ will rotate the object around this rotated coordinate system |  |
EnableStaticRendering(bool) | if set the primitive is only rendered once (like walls) any dynamic changes later won't have an effect. This is useful for objects like posts, metal ramps, or static toys, because this won't have an impact of the perfomance. Static objects are also rendered in higher quality than dynamic ones. Not adjustable by script. |  |
HasHitEvent(bool) | enables the support for a hit event in the script (it's the same as for walls) |  |
Threshold(float) | hit threshold for firing the hit event |  |
HitThreshold(float) | holds the current hit threshold if a ball has hit the primitive |  |
Collidable(bool) | enables/disables collision detection, this can be used from within the script. |  |
Elasticity(float) |  |  |
ElasticityFalloff(float) |  |  |
Friction(float) | 0..1 |  |
Scatter(float) |  |  |
IsToy(bool) | This option should always be set if the primitive will never be collideable. It disables collision handling and all physics preprocessing completely. It overwrites the Collidable-flag and can't be used from within the script. Useful if you have real toys or static primitives which are never hitable at all and are just there for the 'looks'. If collideable is false with while toy is false, VPX still calculates the collision mapping in case it is later changed by script, which impacts table start performance. |  |
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) |  |
BackfacesEnabled(bool) | default=false, if enabled will also show/render the backfacing triangles (if a transparent material is used) |  |
UserValue(any) | can store any user defined value for re-use later-on |  |
 |  |  |
The following only applies to mesh primitives with an animation sequence |  |  |
PlayAnim(float startFrame, float speed) | start playing the sequence from 'startFrame' til the end with frame rate 'speed' |  |
PlayAnimEndless(float speed) | start playing the sequence in a loop with frame rate 'speed' |  |
StopAnim() | stop the animation |  |
ContinueAnim(float speed) | continue a stopped animation with frame rate 'speed' |  |
ShowFrame(float frameNr) | show the mesh at frame 'frameNr', where 'frameNr' can also be a fractional frame number like 1.23. VP will interpolate between subframes. |  |
Event | Detail | Example |
---|---|---|
_Init |  |  |
(_Timer) | CURRENTLY DISABLED |  |
_Hit |  |  |