VPX Documentation

Plunger

4min
variables variables are items in vpx you can set, adjust or call call detail example animframes(int) flat style only the number of animation frames in the image; the image must be arranged with all of the frames lined up horizontally, all the same size, with the fully forward image in the leftmost cell autoplunger(bool) if set, this is a solenoid launcher rather than a traditional plunger color(ole color) surface color for 3d rendering; used only if no texture is specified via image firespeed(float) speed of firing when fire() is called or mechanical plunger is released; controls both animation speed and ball launch strength image(string) image used as texture for the 3d styles or as animation cell(s) for the flat style mechplunger(bool) true if this simulation plunger can be controlled by a mechanical plunger input device attached to the system; if set, the parkposition is used as the rest position mechstrength(float) controls strength of coupling to mechanical plunger position; using about the same value as firespeed usually works best momentumxfer(float) adjustment factor for launch strength; multiplied into final ball speed calculation on each launch, so 1 0 has no effect, and 2 0 doubles the strength name(string) name of the object for scripting references parkposition(float) distance back from fully forward position of resting position (as a fraction of the total length); used only if mechplunger is enabled pullspeed(float) speed of retraction when pullback() is called (for pulling via keyboard interface) ringdiam(float) custom type only the diameter of the e ring in the on screen rendering, as a fraction of the width setting ringgap(float) custom type only the distance between the tip and the e ring in the on screen rendering ringthickness(float) custom type only the thickness of the e ring in the on screen rendering roddiam(float) custom type only the drawing diameter of the rod as a fraction of the width setting springdiam(float) custom type only the diameter of the spring coil in the on screen rendering, as a fraction of the width setting springendloops(float) custom type only the number of stationary (non stretching) "end loops" the spring makes in the on screen rendering (fractional values are allowed) springgauge(float) custom type only the thickness of the spring wire in the on screen rendering springloops(float) custom type only the number of loops the spring makes around the rod within the displayed extent (fractional values are allowed, as partial loops are perfectly sensible) stroke(float) total travel distance; also controls the on screen length (which is slightly longer than the travel distance, to accommodate the non moving parts) scattervelocity(float) amount of randomness added to ball velocity on firing shape(string) custom type only a list of distance/diameter pairs separated by semicolons specifying the shape of the tip, as a series of circles centered on the plunger axis surface(string) object for aligning vertical position of plunger; sits atop playfield if this is left blank timerenabled(bool) enable the plunger's script timer timerinterval(int) interval for firing the plunger's script timer type(int) the visual style of the plunger drawn on screen uservalue(any) can store any user defined value for re use later on visible(bool) true if plunger is visible on screen width(float) on screen width of the plunger on each side of the center line (this acts like a radius, so the actual drawing width is twice this value) x(float) x position of center line of plunger y(float) y position of back end of plunger zadjust(float) moves the on screen rendering vertically up (positive values) or down (negative values) from the default position determined by the surface alignment methods methods are procedures or actions that you can fire in vpx call detail example pullback() start retracting the plunger at the speed given by pullspeed; continues automatically until fire() is called fire() fire the plunger from the current position (for an auto plunger, immediately pulls back all the way and fires with full strength) createball(iball ball) create a new ball located at the tip of the plunger position() returns a float (0 to 25) with the current position of the (mechanical or digital) plunger motiondevice() returns a non zero integer with the type of special input device attached, or 0 if none is attached (1=pinball wizard, 2=ultracade, 3=sidewinder, 4=virtuapin plunger kit, 5=generic/other) events event detail example init timer eos bos dispinterface iplungerevents { properties methods \[id(dispid gameevents init)] void init(); \[id(dispid timerevents timer)] void timer(); \[id(dispid limitevents eos)] void limiteos( \[in] float parm); \[id(dispid limitevents bos)] void limitbos( \[in] float parm); }