VISUAL PINBALL
OBJECTS SETTINGS
VERSION 5.1

Many thanks to RolandSholz, AngelEyeUK, and Proginoskes



General Information

BALL
BUMPER
COLLECTION
DISPREEL (EMREEL)
DRAGPOINT (CONTROL POINT)
FLIPPER
GATE
IDECAL
ITABLE
KICKER
LIGHT
LIGHTSEQ
PLUNGER
RAMP
SPINNER
TABLE
TEXTBOX
TIMER
TRIGGER
WALL (SURFACE / TARGET)



General Information


Below, all objects in VP6 have been listed, along with properties of these objects, where they can be modified, the events (subroutines that are written by the table designer), and the methods (pre-defined subroutines) that are allowed, and that occur with each object.

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 TypeDescription
BooleanTrue or False
IntegerA number without a fraction, between -231and 231
SingleSingle-float numbers; these may have a fraction with them
DoubleDouble-precision numbers; very precise numbers
OLE_ColorThree 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
StringA list of bytes, usually alphanumeric characters (letters and numbers)
IFontDispA format for displaying fonts
VariantAn 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.

Angles are sometimes used to denote direction. Angles are given in degrees, and match up with the standard locations: 0 degrees is north, 90 is east, 180 is south, and 270 is west.

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:

EventDescriptionObjects
InitThe script inside this subroutine is executed when the table begins. most objects
HitThis script is executed whenever the object has been struck. most objects
SpinThis script is executed when a spinner is hit. It runs once for each time the spinner completes a revolution.spinner
SlingshotSome 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
UnhitThe script in this subroutine is executed when the ball leaves the area laid out by a trigger.trigger only
TimerEvery 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:

PropertyUnits
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.

Information that has changed since vpobjectssettings4.txt was written (or is incorrect in that file) is denoted by a *.



ACTIVEBALL
(variable)

PropertyE?S?Data Type
UserValue SVariant
VelX SDouble
VelY SDouble
VelZ SDouble
X SDouble
Y SDouble
Z SDouble



BALL
(object)

PropertyE?S?Data TypeComments
BackDecalESStringin editor only the default ball can be changed
Color SOLE_COLOR 
FrontDecalESStringin editor only the default ball can be changed
ImageESStringin editor only the default ball can be changed



BUMPER
(object)

PropertyE?S?Data TypeComments
BlinkIntervalESInteger 
BlinkPatternESString"0"=off, "1"=on
CastsShadowE Boolean 
ColorE OLE_Color 
Disabled SBoolean 
FlashWhenHitESBoolean 
ForceESSingle 
ImageE String 
OverhangE Single * 
RadiusE Single * 
SideColorE OLE_COLOR 
StateESLightStateLightStateOff = 0, LightStateOn = 1, LightStateBlinking = 2
SurfaceE String 
ThresholdESSingle 
TimerEnabledESBoolean 
TimerIntervalESInteger 
UserValueESVariable 
X *E Singlex-coord of center of bumper
Y *E Singley-coord of center of bumper

Events: Hit(), Init(), Timer()



COLLECTION
(object)

PropertyE?S?Data Type
_NewEnum SUNKNOWN
Count SInteger
Item SIDispatch

Events: Hit(idx), Init(idx), Slingshot(idx), Spin(idx), Timer(idx), Unhit(idx)



DISPREEL (EMREEL)
(object)

PropertyE?S?Data TypeComment
BackColorESOLE_COLOR 
FontE IFontDisp 
FontColorE OLE_COLOR 
HeightE Single 
ImageE String 
ImagesPerGridRowE Integer 
IsShadingE Boolean 
IsTransparentESBoolean 
NameE String 
RangeE Single# of images in the reel image
ReelColorE OLE_COLOR 
ReelsE Single# of reels
SoundESString 
SpacingE Single 
StepsESSingle 
TimerEnabledESBoolean 
TimerIntervalESBoolean 
TypeE ReelTypeReelText = 0, ReelImage = 1
UpdateIntervalESInteger 
UseImageGridE Boolean 
UserValueESVariant 
WidthE Single 
XE Single 
YE Single 

Methods:

MethodData Type(s)Description
AddValue xIntegerx = amount added
ResetToZero 
SetValue xIntegerx = number that the EMReel is set to
SpinReel r, pInteger, Integerr = ReelNumber, p = PulseCount

Events: Init, Timer



DRAGPOINT (CONTROL POINT)

PropertyE?S?Data Type
IsAutoTextureCoordinateE Boolean
SmoothE Boolean
TextureCoordinateE Single
XE Single
YE Single



FLIPPER
(object)

PropertyE?S?Data TypeComments
BaseRadiusE Single 
ColorE OLE_COLOR 
CurrentAngle SSingleread only
ElasticityESSingle 
EndAngleE Single 
EndRadiusE Single 
LengthE Single 
NameE String 
RubberColor *E OLE_COLOR 
RubberThicknessE Integerstored in the .vpt file as a Single
SpeedESSingle 
StartAngleE Single 
StrengthESSingle 
SurfaceE String 
TimerEnabledESBoolean 
TimerIntervalESInteger 
UserValueESVariable 
VisibleE*S*Boolean 
XE Single 
YE Single 

Methods: RotatetoEnd, RotatetoStart

Events: Hit, Init, Timer



GATE
(object)

PropertyE?S?Data Type
LengthE Single
NameE String
Open SBoolean
RotationE Single
SurfaceE String
TimerEnabled SBoolean
TimerInterval SInteger
UserValueE String
XE Single
YE Single

Events: Hit, Init, Timer



IDECAL
(this is an interface; a decal has no name, therefore it can't be accessed in the script)

PropertyE?Data TypeComments
FontEIFontDisp 
FontColorEOLE_COLOR 
HasVerticalTextEBoolean 
HeightESingle 
ImageEString 
RotationESingle 
SizingTypeESizingTypeAutoSize = 0, AutoWidth = 1, ManualSize = 2
SurfaceEString 
TextEString 
TypeEDecalTypeDecalText = 0, DecalImage = 1
WidthESingle 
XESingle 
YESingle 



ITABLE
(another interface; use the following properties without any object name)

PropertyE?S?Data TypeComments
ActiveBall Sobject See ACTIVEBALL for properties of ActiveBall
AddCreditKeyESInteger 
CenterTiltKeyESInteger 
GameTime SIntegerelapsed time in milliseconds
GetPlayerHWnd SIntegerwindow handle of main table player window
LeftFlipperKeyESInteger 
LeftTiltKeyESInteger 
PlungerKeyESInteger 
RightFlipperKeyESInteger 
RightTiltKeyESInteger 
StartGameKeyESInteger 
UserDirectory SString 

Methods:

MethodData Type(s)Description
EndMusic stop music
GetTextFile xStringx = Filename
LoadValue t, nString, Stringt = TableName, n = ValueName
loads from VPReg.stg
{name}_MusicDone procedures to perform when music is done playing
Nudge a, fSingle, Singlea = Angle, f = Force
PlayMusic sStrings = filename
PlaySound s [,l] [,v]String, Integer, Single s = sound name, t = TableName, n = ValueName, v = Value
saves to VPReg.stg
StopSound sStrings = sound name



KICKER
(object)

PropertyE?S?Data TypeComments
ColorESOLE_COLOR 
DrawStyleE KickerTypeKickerHidden = 0, KickerHole = 1, KickerCup = 2
EnabledESBoolean 
NameE String 
SurfaceE String 
TimerEnabledESBoolean 
TimerIntervalESInteger 
UserValueE Variable 
XE Single 
YE Single 

Methods:

MethodData 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, Singlea = Angle, s = Speed, i = (Vertical) Inclination

Events: Hit, Init, Timer



LIGHT
(object)

PropertyE?S?Data TypeComments
BlinkIntervalESInteger 
BlinkPatternESString"0"=off, "1"=on
BorderColorE OLE_COLOR 
BorderWidthE Single * 
ColorE OLE_COLOR 
NameE String 
RadiusE Single 
ShapeE ShapeTypeShapeCircle = 0, ShapeCustom = 1
StateESLightStateLightStateOff = 0, LightStateOn = 1, LightStateBlinking = 2
SurfaceE String 
TimerEnabledESBoolean 
TimerIntervalESInteger 
UserValueE Variable 
XE Integer 
YE Integer 

Events: Init, Timer



LIGHTSEQ
(object)

PropertyE?S?Data Type
CenterXE Single
CenterYE Single
CollectionE String
NameE String
TimerEnabledESBoolean
TimerIntervalESInteger
UpdateIntervalESInteger
UserValueESVariable

Methods

MethodData 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:

SeqUpOn1
SeqUpOff2
SeqDownOn3
SeqDownOff4
SeqRightOn5
SeqRightOff6
SeqLeftOn7
SeqLeftOff8
SeqDiagUpRightOn9
SeqDiagUpRightOff10
SeqDiagUpLeftOn11
SeqDiagUpLeftOff12
SeqDiagDownRightOn13
SeqDiagDownRightOff14
SeqDiagDownLeftOn15
SeqDiagDownLeftOff16
SeqMiddleOutHorizOn17
SeqMiddleOutHorizOff18
SeqMiddleInHorizOn19
SeqMiddleInHorizOff20
SeqMiddleOutVertOn21
SeqMiddleOutVertOff22
SeqMiddleInVertOn23
SeqMiddleInVertOff24
SeqStripe1HorizOn25
SeqStripe1HorizOff26
SeqStripe2HorizOn27
SeqStripe2HorizOff28
SeqStripe1VertOn29
SeqStripe1VertOff30
SeqStripe2VertOn31
SeqStripe2VertOff32
SeqHatch1HorizOn33
SeqHatch1HorizOff34
SeqHatch2HorizOn35
SeqHatch2HorizOff36
SeqHatch1VertOn37
SeqHatch1VertOff38
SeqHatch2VertOn39
SeqHatch2VertOff40
SeqCircleOutOn41
SeqCircleOutOff42
SeqCircleInOn43
SeqCircleInOff44
           
SeqClockRightOn45
SeqClockRightOff46
SeqClockLeftOn47
SeqClockLeftOff48
SeqRadarRightOn49
SeqRadarRightOff50
SeqRadarLeftOn51
SeqRadarLeftOff52
SeqWiperRightOn53
SeqWiperRightOff54
SeqWiperLeftOn55
SeqWiperLeftOff56
SeqFanLeftUpOn57
SeqFanLeftUpOff58
SeqFanLeftDownOn59
SeqFanLeftDownOff60
SeqFanRightUpOn61
SeqFanRightUpOff62
SeqFanRightDownOn63
SeqFanRightDownOff64
SeqArcBottomLeftUpOn65
SeqArcBottomLeftUpOff66
SeqArcBottomLeftDownOn67
SeqArcBottomLeftDownOff68
SeqArcBottomRightUpOn69
SeqArcBottomRightUpOff70
SeqArcBottomRightDownOn71
SeqArcBottomRightDownOff72
SeqArcTopLeftUpOn73
SeqArcTopLeftUpOff74
SeqArcTopLeftDownOn75
SeqArcTopLeftDownOff76
SeqArcTopRightUpOn77
SeqArcTopRightUpOff78
SeqArcTopRightDownOn79
SeqArcTopRightDownOff80
SeqScrewRightOn81
SeqScrewRightOff82
SeqScrewLeftOn83
SeqScrewLeftOff84
SeqLastDynamic85
SeqAllOff1000
SeqAllOn1001
SeqBlinking1002
SeqRandom1003



PLUNGER
(object)

PropertyE?S?Data Type
FireSpeed (Editor/Script As Single)
FireSpeed ES Single
Name E  String
PullSpeed ES Single
Surface E  String
TimerEnabled ES Boolean
TimerInterval ES Integer
UserValue E  Variable
X E  Single
Y E  Single

Methods: CreateBall, Fire, PullBack

Events: Init, Timer



RAMP
(object)

PropertyE?S?Data TypeComments
Color E  OLE_COLOR  
HasWallImage E  Boolean  
HeightBottom E  Single  
HeightTop E  Single  
Image E  String  
ImageAlignment E  RampImageAlignment ImageModeWorld = 0, ImageMode Wrap = 1
Name E  String  
Type E  RampType RampTypeFlat = 0, RampType4Wire = 1 *, RampType2Wire = 2 *, RampType3WireLeft = 3, RampType3WireRight = 4.
UserValue E  Variable  
WidthBottom E  Single  
WidthTop E  Single  

Events: Init



SPINNER
(object)

PropertyE?S?Data Type
CastsShadow E  Boolean
Color E  OLE_COLOR
Friction ES Single
Height E  Single
ImageBack E  String
ImageFront E  String
Length E  Single
Name E  String
Rotation E  Single
Surface E  String
TimerEnabled ES Boolean
TimerInterval ES Integer
X E  Single
Y E  Single

Events: Init, Spin, Timer



TABLE
(object)

PropertyE?S?Data Type
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
PlayfieldColor E  OLE_COLOR
RenderShadows E  Boolean
Slope ES Single
Width E  Single
YieldTime  S Variable

Methods

MethodData Type(s)Description
Nudge a, f Single, Singlea = Angle, f = Force

Events: Exit, Init, KeyDown(keycode), KeyUp(keycode), MusicEnded, UnPaused



TEXTBOX
(object)

PropertyE?S?Data TypeComments
Alignment ES TextAlignment TextAlignLeft = 0, TextAlignCenter = 1, TextAlignRight = 2
BackColor ES OLE_COLOR  
Font E  IFontDisp  
FontColor ES OLE_COLOR  
Height E  Single  
IsTransparent ES Boolean  
Name E  String  
Text ES String  
TimerEnabled ES Boolean  
TimerInterval ES Integer 
UserValue ES 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



TIMER
(object)

PropertyE?S?Data Type
Enabled ES Boolean
Interval ES Integer
Name E  String
UserValue ES Variant

Events: Init, Timer



TRIGGER
(object)

PropertyE?S?Data TypeComments
Enabled ES Boolean  
Name E  String  
Radius E  Single  
Shape E  ShapeType *ShapeCircle = 0, ShapeCustom = 1
Surface E  String  
TimerEnabled ES Boolean  
TimerInterval ES Integer  
UserValue E  Variable 
Visible E  Boolean  
X E  Single  
Y E  Single  

Events: Hit, Init, Timer, Unhit



WALL (SURFACE/TARGET)
(object)

Note: A surface is a wall that cannot be dropped. A target is a wall that can be dropped.

PropertyE?S?Data TypeComments
CanDrop E  Boolean  
CastsShadow E  Boolean  
Disabled ES Boolean  
DisplayTexture E  Boolean  
Elasticity E  Single 
FaceColor E  OLE_COLOR  
Has HitEvent 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  
SlingshotStrength E  Single  
Threshold E  Single  
TimerEnabled ES Boolean  
TimerInterval  S Integer  
UserValue E  Variable  
Visible E  Boolean 

Events: Hit, Init, Slingshot, Timer