VISUAL PINBALL
|
---|
For properties, the following are listed, one column at a time: the name of that property, whether it can be changed in the editor (E means yes), whether it can be changed in the script (S means yes), what data type it is, and (sometimes) some clarifyingcomments.
Data Types:
Data Type | Description |
---|---|
Boolean | True or False |
Integer | A number without a fraction, between -231and 231 |
Single | Single-float numbers; these may have a fraction with them |
Double | Double-precision numbers; very precise numbers |
OLE_Color | Three bytes (integers between 0 and 255), the first giving the intensity of red, the second the intensity of green, the third the intensity of blue |
String | A list of bytes, usually alphanumeric characters (letters and numbers) |
IFontDisp | A format for displaying fonts |
Variant | An object with an arbitrary data type |
Other data types usually consist of single bytes, with certain numbers representing certain options. (See "LightState" under BUMPER, for instance.) You can use the descriptive name ("LightStateOn") or the number (1); VP understands both.
If a blinking pattern is specified, 0 represents the light or bumper being off, and 1 represents it being on, for "blink interval". For instance, if BlinkInterval = 500 and BlinkPattern = 1101110, then the light or bumper will be on for 1000 milliseconds, off for 500, on for 1500, and off for 500.
Now for events. There are certain types of events that recur in the list below, so it is worth while to mention what comes up again and again:
Event | Description | Objects |
---|---|---|
Init | The script inside this subroutine is executed when the table begins. | most objects |
Hit | This script is executed whenever the object has been struck. | most objects |
Spin | This script is executed when a spinner is hit. It runs once for each time the spinner completes a revolution. | spinner |
Slingshot | Some sides of walls can be programmed to reflect the ball with more energy than it started with. When the ball strikes such a surface of an object, the script inside this Sub is executed. | walls only |
Unhit | The script in this subroutine is executed when the ball leaves the area laid out by a trigger. | trigger only |
Timer | Every VP object comes with a timer, a device which marks a certain amount of time, once it is enabled. When this time is up, the script inside the Timer subroutine is executed. Note that if the timer is not disabled, the subroutine will run again. | most objects |
Since these subroutines belong to different objects, when writing the script, you combine the name of the object with the name of the event. For instance, the instructions in the subroutine DropTarget1_Hit will be executed when DropTarget1 is hit by a ball.
In the case of collections, the event will also receive a variable called the index. This means that the indexth item in the collection has been hit, or unhit, or whatever.
Units:
Property | Units |
---|---|
X, Y, Z | (VP units) The ball is 50 VP units in diameter. The value of X is between 0 (left side of the table) and {Table}.Width (right side of the table, where {Table} is the name of the table), Y is between 0 (the far side of the table) and {Table}.Height, and Z is between 0 (the surface of the table) and {Table}.GlassHeight (the top surface of the table, where the glass is on pinball machines). |
VelX, VelY, VelZ | (VP units per 100 milliseconds -- yes, you read that right) Used mainly to tell which direction the ball is going. If VelX is positive, it means X is increasing. Thus, if VelY is negative and VelZ is positive, the ball is moving away from you and up towards the glass. |
TimerInterval | (milliseconds -- 1/1000 of a second) |
Granted, this has been a lot of information, but a good deal of it has not been documented, poorly documented, or documented in several places.
Property | E? | S? | Data Type |
---|---|---|---|
UserValue | S | Variant | |
VelX | S | Double | |
VelY | S | Double | |
VelZ | S | Double | |
X | S | Double | |
Y | S | Double | |
Z | S | Double |
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
BackDecal | E | S | String | in editor only the default ball can be changed |
Color | S | OLE_COLOR | ||
FrontDecal | E | S | String | in editor only the default ball can be changed |
Image | E | S | String | in editor only the default ball can be changed |
Name | S | String | [8.1 and later] Identifies type of object | |
VelX | S | Double | [8.1 and later] | |
VelY | S | Double | [8.1 and later] | |
VelZ | S | Double | [8.1 and later] | |
X | S | Double | [8.1 and later] | |
Y | S | Double | [8.1 and later] | |
Z | S | Double | [8.1 and later] |
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
BlinkInterval | E | S | Integer | |
BlinkPattern | E | S | String | "0"=off, "1"=on |
CastsShadow | E | Boolean | ||
Color | E | OLE_Color | ||
Disabled | S | Boolean | ||
FlashWhenHit | E | S | Boolean | |
Force | E | S | Single | |
Image | E | String | ||
Name | S | String | ||
Overhang | E | Single | ||
Radius | E | Single | ||
SideColor | E | OLE_COLOR | ||
State | E | S | LightState | LightStateOff = 0, LightStateOn = 1, LightStateBlinking = 2 |
Surface | E | String | ||
Threshold | E | S | Single | |
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
UserValue | E | S | Variable | |
X | E | Single | x-coord of center of bumper | |
Y | E | Single | y-coord of center of bumper |
Events: Hit(), Init(), Timer()
Property | E? | S? | Data Type |
---|---|---|---|
_NewEnum | S | UNKNOWN | |
Count | S | Integer | |
Item | S | IDispatch |
Events:
Hit(idx), Init(idx), Slingshot(idx), Spin(idx), Timer(idx), Unhit(idx)
Property | E? | S? | Data Type | Comment |
---|---|---|---|---|
Height | ? | ? | Single? | |
Name | S | String | Identifies type of object | |
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
UserValue | E | S | Variable | |
X | E | ? | Single | x-coord of center of bumper |
Y | E | ? | Single | y-coord of center of bumper |
Events: Init, Timer
Property | E? | S? | Data Type | Comment |
---|---|---|---|---|
BackColor | E | S | OLE_COLOR | |
Font | E | IFontDisp | ||
FontColor | E | OLE_COLOR | ||
Height | E | Single | ||
Image | E | String | ||
ImagesPerGridRow | E | Integer | ||
IsShading | E | Boolean | ||
IsTransparent | E | S | Boolean | |
Name | E | String | ||
Range | E | Single | # of images in the reel image | |
ReelColor | E | OLE_COLOR | ||
Reels | E | Single | # of reels | |
Sound | E | S | String | |
Spacing | E | Single | ||
Steps | E | S | Single | |
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Boolean | |
Type | E | ReelType | ReelText = 0, ReelImage = 1 | |
UpdateInterval | E | S | Integer | |
UseImageGrid | E | Boolean | ||
UserValue | E | S | Variant | |
Width | E | Single | ||
X | E | Single | ||
Y | E | Single |
Method | Data Type(s) | Description |
---|---|---|
AddValue x | Integer | x = amount added |
ResetToZero | ||
SetValue x | Integer | x = number that the EMReel is set to |
SpinReel r, p | Integer, Integer | r = ReelNumber, p = PulseCount |
Events: Init, Timer
Property | E? | S? | Data Type |
---|---|---|---|
IsAutoTextureCoordinate | E | Boolean | |
Smooth | E | Boolean | |
TextureCoordinate | E | Single | |
X | E | Single | |
Y | E | Single |
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
BaseObliqueCorrection | ? | Single? | [8.1 and later] | |
BaseRadius | E | Single | ||
Color | E | OLE_COLOR | ||
CurrentAngle | S | Single | read only | |
Elasticity | E | S | Single | |
EndAngle | E | Single | ||
EndRadius | E | Single | ||
Length | E | Single | ||
Name | E | String | ||
ObliqueCorrection | ? | Single? | [8.1 and later] | |
PowerLaw | E | ? | Single? | [8.1 and later] |
Recoil | E | ? | Single? | [8.1 and later] |
Return | E | ? | Single? | [8.1 and later] |
ReturnSpeed | E | ? | Single? | [8.1 and later] |
ReturnStrength | E | ? | Single? | [8.1 and later] |
RubberColor | E | OLE_COLOR | ||
RubberHeight | ? | Single? | [8.1 and later] | |
RubberThickness | E | Integer | stored in the .vpt file as a Single | |
RubberWidth | ? | Single? | [8.1 and later] | |
ScatterAngle | ? | Single? | [8.1 and later] | |
Speed | E | S | Single | |
StartAngle | E | Single | ||
Strength | E | S | Single | |
Surface | E | String | ||
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
TipObliqueCorrection | ? | Single? | [8.1 and later] | |
UserValue | E | S | Variable | |
Visible | E | S | Boolean | |
X | E | Single | ||
Y | E | Single |
Methods: RotatetoEnd, RotatetoStart
Events: Hit, Init, Timer
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
Color | E | ? | OLE_Color | |
Elasticity | E | ? | Single | [8.1 and later] |
Length | E | Single | ||
Name | E | String | ||
Open | S | Boolean | ||
Rotation | E | Single | ||
Surface | E | String | ||
TimerEnabled | S | Boolean | ||
TimerInterval | S | Integer | ||
UserValue | E | String | ||
X | E | Single | ||
Y | E | Single |
Events: Hit, Init, Timer
Property | E? | Data Type | Comments |
---|---|---|---|
Font | E | IFontDisp | |
FontColor | E | OLE_COLOR | |
HasVerticalText | E | Boolean | |
Height | E | Single | |
Image | E | String | |
Rotation | E | Single | |
SizingType | E | SizingType | AutoSize = 0, AutoWidth = 1, ManualSize = 2 |
Surface | E | String | |
Text | E | String | |
Type | E | DecalType | DecalText = 0, DecalImage = 1 |
Width | E | Single | |
X | E | Single | |
Y | E | Single |
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
ActiveBall | S | object | See ACTIVEBALL for properties of ActiveBall | |
AddCreditKey | E | S | Integer | |
CenterTiltKey | E | S | Integer | |
GameTime | S | Integer | elapsed time in milliseconds | |
GetPlayerHWnd | S | Integer | window handle of main table player window | |
LeftFlipperKey | E | S | Integer | |
LeftTiltKey | E | S | Integer | |
PlungerKey | E | S | Integer | |
RightFlipperKey | E | S | Integer | |
RightTiltKey | E | S | Integer | |
StartGameKey | E | S | Integer | |
UserDirectory | S | String | ||
VPBuildVersion | S | Integer? | [8.1 and later] read-only? |
Methods:
Method | Data Type(s) | Description |
---|---|---|
BeginModal | ? | [8.1 and later] |
EndModal | ? | [8.1 and later] |
EndMusic | stop music | |
GetTextFile x | String | x = Filename |
LoadValue t, n | String, String | t = TableName, n = ValueName
loads from VPReg.stg |
Nudge a, f | Single, Single | a = Angle, f = Force |
PlayMusic s | String | s = filename |
PlaySound s [,l] [,v] | String, Integer, Single | s = sound name, |
SaveValue t, n, v | String, String, Variant | t = TableName, n = ValueName, v = Value saves to VPReg.stg |
StopSound s | String | s = sound name |
Event: MusicDone
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
Color | E | S | OLE_COLOR | |
DrawStyle | E | KickerType | KickerHidden = 0, KickerHole = 1, KickerCup = 2 | |
Enabled | E | S | Boolean | |
Name | E | String | ||
Surface | E | String | ||
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
UserValue | E | Variable | ||
X | E | Single | ||
Y | E | Single |
Methods:
Method | Data Type(s) | Description |
---|---|---|
CreateBall |   | Returns a pointer to the ball created, making expressions like K1.CreateBall.Color = RGB(0,255,0) possible |
DestroyBall | ||
Kick a, s [,i] | Single, Single, Single | a = Angle, s = Speed, i = (Vertical) Inclination |
Events: Hit, Init, Timer
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
BlinkInterval | E | S | Integer | |
BlinkPattern | E | S | String | "0"=off, "1"=on |
BorderColor | E | OLE_COLOR | ||
BorderWidth | E | Single | ||
Color | E | OLE_COLOR | ||
Name | E | String | ||
Radius | E | Single | ||
Shape | E | ShapeType | ShapeCircle = 0, ShapeCustom = 1 | |
State | E | S | LightState | LightStateOff = 0, LightStateOn = 1, LightStateBlinking = 2 |
Surface | E | String | ||
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
UserValue | E | Variable | ||
X | E | Integer | ||
Y | E | Integer |
Events: Init, Timer
Property | E? | S? | Data Type |
---|---|---|---|
CenterX | E | Single | |
CenterY | E | Single | |
Collection | E | String | |
Name | E | String | |
TimerEnabled | E | S | Boolean |
TimerInterval | E | S | Integer |
UpdateInterval | E | S | Integer |
UserValue | E | S | Variable |
Methods
Method | Data Type(s) | Description |
---|---|---|
Play a [,t] [,r] [,p] | SequencerState, Integer, Integer, Integer | a = Sequencer State, t = TailLength, r = Repeats (default 1), p = Pause |
StopPlay | stops flashing lights in the pattern given by Play |
Events: Init, PlayDone, Timer
SequencerState can be one of:
|
|
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
AutoPlunger | E | ? | Boolean | [8.1 and later] "Automatic" in Editor |
BreakOverVelocity | ? | Single? | [8.1 and later] | |
FireSpeed | E | S | Single | |
Name | E | String | ||
ParkPosition | ? | Single? | [8.1 and later] | |
PullSpeed | E | S | Single | |
ScatterVelocity | E | ? | Single? | [8.1 and later] "Scatter" in Editor |
Stroke | E | ? | Single? | [8.1 and later] "Stroke Height" in Editor |
Surface | E | String | ||
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
UserValue | E | Variable | ||
X | E | Single | ||
Y | E | Single |
Methods: CreateBall, Fire, PullBack
Events: Init, Timer
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
CastsShadow | E | Boolean | ||
Color | E | OLE_COLOR | ||
Elasticity | E | ? | Single | [8.1 and later] |
Friction | ? | Single | [8.1 and later] | |
HasWallImage | E | Boolean | ||
HeightBottom | E | Single | ||
HeightTop | E | Single | ||
Image | E | String | ||
ImageAlignment | E | RampImageAlignment | ImageModeWorld = 0, ImageMode Wrap = 1 | |
LeftWallHeight | E | Single? | ||
Name | E | String | ||
RightWallHeight | E | Single? | ||
Type | E | RampType | RampTypeFlat = 0, RampType4Wire = 1 , RampType2Wire = 2 , RampType3WireLeft = 3, RampType3WireRight = 4. | |
UserValue | E | Variable | ||
VisibleLeftWallHeight | E | Single? | ||
VisibleRightWallHeight | E | Single? | ||
WidthBottom | E | Single | ||
WidthTop | E | Single |
Events: Init
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
CastsShadow | E | Boolean | ||
Color | E | OLE_COLOR | ||
Friction | E | S | Single | |
Height | E | Single | ||
ImageBack | E | String | ||
ImageFront | E | String | ||
Length | E | Single | ||
Name | E | String | ||
Overhang | E | Single | ||
Rotation | E | Single | ||
Surface | E | String | ||
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
X | E | Single | ||
Y | E | Single |
Events: Init, Spin, Timer
Property | E? | S? | Data Type | Comment |
---|---|---|---|---|
BackdropColor | E | OLE_COLOR | ||
BackdropImage | E | String | ||
BallBackDecal | E | String | ||
BallFontDecal | E | String | ||
BallImage | E | String | ||
DisplayBackdrop | E | Boolean | ||
DisplayGrid | E | Boolean | ||
FieldOfView | E | Single | ||
GlassHeight | E | Single | ||
GridSize | E | Single | ||
Height | E | Single | ||
Image | E | String | ||
Inclination | E | Single | ||
Name | E | String | ||
Paused | S | Boolean | [8.1 and later] | |
PhysicsType | E | ? | Boolean | [8.1 and later] 0 = PhysicsVP, 1 = PhysicsUltracade |
PlayfieldColor | E | OLE_COLOR | ||
RenderShadows | E | Boolean | ||
Slope | E | S | Single | |
Width | E | Single | ||
YieldTime | S | Variable |
Methods
Method | Data Type(s) | Description |
---|---|---|
Nudge a, f | Single, Single | a = Angle, f = Force |
Events: Exit, Init, KeyDown(keycode), KeyUp(keycode), MusicEnded, UnPaused
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
Alignment | E | S | TextAlignment | TextAlignLeft = 0, TextAlignCenter = 1, TextAlignRight = 2 |
BackColor | E | S | OLE_COLOR | |
Font | E | IFontDisp | ||
FontColor | E | S | OLE_COLOR | |
Height | E | Single | ||
IsTransparent | E | S | Boolean | |
Name | E | String | ||
Text | E | S | String | |
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
UserValue | E | S | Variable | |
Width | E | Single | ||
X | E | Single | ||
Y | E | Single |
Note: Script must refresh Text property if Alignment, BackColor, FontColor, or IsTransparent have been changed. In other words, changing FontColor will not change the color of the text already present, but it will change the color of any new text. To "refresh" the text, you can use the following in your script:
{Name}.Text = {Name}.Text
Events: Init, Timer
Property | E? | S? | Data Type |
---|---|---|---|
Enabled | E | S | Boolean |
Interval | E | S | Integer |
Name | E | String | |
UserValue | E | S | Variant |
Events: Init, Timer
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
Enabled | E | S | Boolean | |
Name | E | String | ||
Radius | E | Single | ||
Shape | E | ShapeType | ShapeCircle = 0, ShapeCustom = 1 | |
Surface | E | String | ||
TimerEnabled | E | S | Boolean | |
TimerInterval | E | S | Integer | |
UserValue | E | Variable | ||
Visible | E | Boolean | ||
X | E | Single | ||
Y | E | Single |
Events: Hit, Init, Timer, Unhit
Note: A surface is a wall that cannot be dropped. A target is a wall that can be dropped.
Property | E? | S? | Data Type | Comments |
---|---|---|---|---|
CanDrop | E | Boolean | ||
CastsShadow | E | Boolean | ||
Disabled | E | S | Boolean | |
DisplayTexture | E | Boolean | ||
Elasticity | E | Single | ||
FaceColor | E | OLE_COLOR | ||
HasHitEvent | E | Boolean | ||
HeightBottom | E | Single | ||
HeightTop | E | Single | ||
Image | E | String | ||
ImageAlignment | E | Boolean | ||
IsDropped | S | Boolean | "CanDrop" must be checked | |
Name | E | String | ||
SideColor | E | OLE_COLOR | ||
SideImage | E | String | ||
SideVisible | E | Boolean | ||
SlingshotColor | E | ? | OLE_Color | [8.1 and later] |
SlingshotStrength | E | Single | ||
Threshold | E | Single | ||
TimerEnabled | E | S | Boolean | |
TimerInterval | S | Integer | ||
UserValue | E | Variable | ||
Visible | E | Boolean |
Events: Hit, Init, Slingshot, Timer