----------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Old script comment style tricks -------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------- '[BAM] !texture = textureName '[BAM] !normalMap = textureName '[BAM] !specularMap = textureName '[BAM] !shininess = value '[BAM] !specularLevel = value '[BAM] !heightMap_bias = value '[BAM] !heightMap_scale = value '[BAM] !specularBalance = value '[BAM] !specularColorRed = value '[BAM] !specularColorGreen = value '[BAM] !specularColorBlue = value '[BAM] !normalMapScale = value '[BAM] !latlong = 1 '[BAM] !latlongRotation = value ----------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------- procedures in script called by BAM -------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------- Sub BAM_Init Sub NewtonPhysicsTick Sub FLIPPERNAME_prehit // note, FLIPPERNAME is FP Object Flipper Name... and xBAM.Flipper "FP Object Flipper Name" must be called in BAM_Init Sub EnumBallsCallback ball // ball is BallInfo object ----------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------- functions, objects, constats accesible with xBAM -------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------- xBAM .Ball (ret: BallInfo ***) .BallID (get int) .BallRadius (set only) .BallMass (set only) .BallOpacity (set only) .BallCloseTo x, y, z (ret: BallInfo ***) .BallSpeedLimit (set only) .EnumBalls max, order, callback_FunctionNameInScript .MiniPlayfield minX, maxX, minY, maxY, minZ, maxZ, toX, toY, toZ, scale .CreateMiniPlayfield maxX, minY, maxY, minZ, maxZ, cenX, cenY, cenZ (ret: MiniPlayfield ***) .CreateMagneticField x, y, z, range, strength (ret: MagneticField ***) .CreateModel ModelTemplateName, x, y, z, height, rotX, rotY, rotZ, relfectionsFlag, z2yFlag (ret: Model ***) .LoadModels .ModelAnimationSplit ModelTemplateName, startFrame, endFrame, dstAnim, srcAnim .SetTexture FPObjectName, textureName, textureId (default textureId = 0) .SetTopTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 0) .SetSideTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 1) .SetEnamelTexture FPObjectName, textureName (same as .SetTexture FPObjectName, textureName, 2) .SetPlayfieldTexture textureName .SetTransliteTexture textureName .SetCabinetTexture textureName .SetPosterTexture textureName .GameRome (property, boolean, can be read and write, TRUE = show game room, FALSE = hide game room) .Flipper FPFlipperObjectName (ret: FlipperExt ***) .FixScore .EnterPinballHighScore CurrentPlayer .GetKeyCode keyId .FrameCounter .NewtonCounter .FindObject x, y, type (get ObjectInfo) .ShadowMap LightSourceFPObjectName, Amount, Passes, Radius, Brighness, SpotlightRange, WhiteLight, Reflection .RemoveFlippersFromShadowmaps (bool value: true/false, can be SET and READ) // obsolete, now it is alway = true .SetBallShadows dark_level, radius_soft, radius_hard, maxLevelAbovePlayfield .PhysicsXML "xml" .Camera (ret: Camera ***) .Physics .SetMaterial PObjectName, elasticCoef, softnessCoef, staticFriction, kineticFriction .ExpandWorldSize left, right, up, down, above, below .BallCollidable - sets it to FALSE and there will be no ball-ball collisions. WRITEONLY .BallManager .DefineCustomBall red, green, blue, dirtTextrureName, reflectionTextureName, reflectionInPlayfieldTextureName (ret: BAM_BALL_TYPE_NAME) .CreatCustomBall BAM_BALL_TYPE_NAME (ret: BallCreationInfo) .CreateTransformation (ret: Transformation) .UpdateBall BallID, BAM_BALL_TYPE_NAME .GetBallName BallID (ret: BAM_BALL_TYPE_NAME) .SetBallOpacity BallID, opacity .SetBallOpacityWithEasing BallId, opcity, time, easingFunction .DispDMD DispDMDName (ret: DispDMDExt) .HudDMD DispDMDName (ret: HudDMDExt) .CreateAllExt .SetDefaultMatrixBaseColor red, green, blue .Lights (ret: Lights ***) .Get pluginName (ret: plugin object) see: PuPPlugin .DisableFlipperShadows() .EnableFlipperShadows() .HideHud() .ShowHud() .HideAllDispOnBackbox() .ShowAllDispOnBackbox() .GetTexture "textureName" // return of texture object... .isValid .normalMap // same as '[BAM] !normalMap = textureName .specularMap // same as '[BAM] !specularMap = textureName .shininess .specularLevel .heightMap_bias .heightMap_scale .specularBalance .specularColorRed .specularColorGreen .specularColorBlue .SetSpecularColor red, green, blue .normalMapScale .latlong .latlongRotation .SetColor red, green, blue .brightness .Trails // way to set in script same ball trails params as in BAM menu .Level // set "level" of ball trails. .Color radm green, blue // set color of ball trails .Enabled // = true or false to enable/disable trails .Table // this variable is same as name of table, so for "NewTable" xBAM.Table is same thing as NewTabele... this way in script you don't have to check name of table to get width, height,.... .LoadGif gifTexture - returns IGif object to control gif animations .VisibleCabParts bitField - every bit of 16 bit word enables/disable cabinet parts (legs, wood parts, etc) .DrawCustomModelsLast - controls when BAM Custom models are drawed (boolean) .DrawCustomModelsWithSurface "surfaceNameInFpEditor" - controls when BAM custom models are drawed .SuppressLoadMessages - set to True to hide BAM yellow loading messages (boolean) .EnableShadows - fake ball/flippers shadows (boolean) .TimeScale - change physics simulation time speed, default = 1.0 (float) .SetShadowColor red, green, blue - sets color of fake shadows .MouseX - horizontal mouse move between frames (READONLY) (int) .MouseY - vertical mouse move between frames (READONLY) (int) .RayCastShadows .Enable - use it to enable/disable ray-cast-shadows from script .Sharpness - float .DarkLevel .Set sharpness, darkLevel - enables shadows and sets params for sharpness and dark level .DumpAllObjectInfo() .ManualRoller - read only, true if manual roller is enabled .CreateRotChart stringWithChart - creates new flipper chart, stringWithChart has same format as in XML, will return id of new chart, see FlipperExt.SetRotChart .BallControlCallback numOfFrames, BallInfo - order BAM to call "BallControlCallback" subroutine after numOfFrames passed in physics simulation for given ball (or xBAM.Ball - last ball from _hit event). BallControlCallback is subroutine in script with one param: ball. .HitNormalSpeed - normal speed of last _hit event .HitContactPoint - point of contact with ball for last _hit event .HitNormalVec - normal vector for last _hit event .SetSharedHitCallbacks materialId, nameOfPreHitCallbackSubroutine, nameOfHitCallbackSubroutine - you can define own _preHit or _hit subroutin for all physics objects with given materialId (they don't have to have _hit event in FP) constansts: xBAM.easeLinear xBAM.easeInSine xBAM.easeOutSine xBAM.easeInOutSine xBAM.easeInQuad xBAM.easeOutQuad xBAM.easeInOutQuad xBAM.easeInCubic xBAM.easeOutCubic xBAM.easeInOutCubic xBAM.easeInQuart xBAM.easeOutQuart xBAM.easeInOutQuart xBAM.easeInQuint xBAM.easeOutQuint xBAM.easeInOutQuint xBAM.easeInExpo xBAM.easeOutExpo xBAM.easeInOutExpo xBAM.easeInCirc xBAM.easeOutCirc xBAM.easeInOutCirc xBAM.easeInBack xBAM.easeOutBack xBAM.easeInOutBack xBAM.easeInElastic xBAM.easeOutElastic xBAM.easeInOutElastic xBAM.easeInBounce xBAM.easeOutBounce xBAM.easeInOutBounce xBAM.orderXYZ xBAM.orderXZY xBAM.orderYXZ xBAM.orderYZX xBAM.orderZXY xBAM.orderZYX xBAM.RESET xBAM.ASAP xBAM.APPEND -------------------------------------------- BallInfo (from xBAM.Ball or xBAM.BallCloseTo) .Position .x .y .z .PositionGlobal .x .y .z .Velocity .x .y .z .Speed .HitSpeed .Exist .ExtInt1 (can be SET or READ) .ExtInt2 (can be SET or READ) .ExtInt3 (can be SET or READ) .ExtFloat1 (can be SET or READ) .ExtFloat2 (can be SET or READ) .ExtFloat3 (can be SET or READ) .Id (READ only) .Name (can be SET or READ) .UpdateBall Red, Green, Blue, DirtTexture, ReflectionTexturem, ReflectionInPlayfield .Opacity (only SET) .SetBallOpacityWithEasing opacity, time, easingFunction .ExtTimer1 (READ only) .ExtTimer2 (READ only) .ExtTimer3 (READ only) .ResetExtTimer idx (idx = 1, 2, 3) .StopExtTimer idx (idx = 1, 2, 3) .Rotation (READ only) - current rotation along all 3 axis .RotationSpeed (READ only) - current rotation speed/omega along all 3 axis .SetShadowColor read, green, blue - color with 3 float values in range 0.0 - 1.0 .SetPosition x, y, z - move ball to point .SetVelocity x, y, z .SetOmega x, y, z .OutVelocity (READ only) .OutPosition (READ only) .OutPositionGlobal (READ only) .OutRotation (READ only) .OutSpeed (READ only) .SetMaterial elasticCoef, elasticCoef, staticFriction, kineticFriction .lineardamping (read/write) .angulardamping (read/write) .SetAngularDamping x, y, z2yFlag .angularSpeed (READ only) --------------------------------------------- BallCreationInfo (from xBAM.BallManager.CreateCustomBall) .Red (read only) .Green (read only) .Blue (read only) .BallNumer (read only) .Opacity (can be SET and READ) --------------------------------------------- Transformation (from xBAM.BallManager.CreateTransformation) .AddRule sourceBall, DestinationBall .Update ballID --------------------------------------------- MiniPlayfield (from xBAM.CreateMiniPlayfield) .Position .x .y .z .Rotation .x .y .z .Scale .Time .MoveTo x, y, z, rotX, rotY, rotZ, scale, time .Easing (set only) .EasingPosition (set only) .EasingRotation (set only) .EasingScale (set only) .TargetPosition .x .y .z .TargetRotation .x .y .z .TargetScale .CurrentPosition .x .y .z .CurrentRotation .x .y .z .CurrentScale .RotationOrder .TrackedBall (can be SET and READ, BallInfo) .TrackedBallExist .TrackedBallStop .Inertia .TraceBallRotation .GravityAngle .GravityRotation .GravityScale .SetGravity angle, rotation, scale .Collidable .PhysicsMove .Update maxX, minY, maxY, minZ, maxZ, cenX, cenY, cenZ ------------------------------------------- MagneticField (from xBAM.CreateMagneticField) .X .Y .Z .Strength .Range .SingleBall .Horizontal .MaxForce .MinZ -------------------------------------------- ObjectInfo (from xBAM.FindObject) (everything read only) .Position .x .y .z .Rotation .x .y .z .Velocity .x .y .z .RotationSpeed .x .y .z .Exist .Material .lineardamping .angulardamping .Center .x .y .z -------------------------------------------- Model (from xBAM.CreateModel) .Position .x .y .z .Rotation .x .y .z .Scale .x .y .z .Z2Y .Reflections .Mode .Anim StringAsAnimationDescription .Loop StringAsAnimationDescription .Frame start, end, loop .CurrentFrame .Speed .Kd .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Ks .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Ke .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Spe .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Rim .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Part partIndex (ret: ModelPart) .Visible .Height -------------------------------------------- ModelPart (from Model.Part partIndex) .Kd .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Ks .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Ke .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Spe .r (is same thing as .x) .g (.y) .b (.z) .a (.w) .Rim .r (is same thing as .x) .g (.y) .b (.z) .a (.w) -------------------------------------------- FlipperExt (from xBAM.Flipper) .Mass .Omega .ReleaseOmega .SetMaterial elasticCoef, softnessCoef, staticFriction, kineticFriction .Angle .ContactPoint .BallHSpeed .BallVSpeed .Hit .AngleDiff .IsSolenoidOn (READONLY) .SetRotationChart chartIdOrStringWithChart // you can pass whole string in same format as in XML or integer value returned by xBAM.CreateRotChart (second option is faster) -------------------------------------------- DispDMDExt (from xBAM.DispDMD) .SetMatrixColor red, green, blue .SetBackgroundMatrixColor red, green, blue .SetMatrixBaseColor red, green, blue .FullColorBackground (bool value: true/false, can be SET and READ) .Visible -------------------------------------------- HudDMDExt (from xBAM.HudDMD) .SetMatrixColor red, green, blue .FullColorBackground (bool value: true/false, can be SET and READ) .SetBackgroundMatrixColor red, green, blue // probably don't work -------------------------------------------- DispReelExt & IDispSegExt (created with xBAM.CreateAllExt from DispReel and DispSeg with added "Ext" at end of object name) .Visible (you can hide disp reel and disp seg with this) -------------------------------------------- LightExt (created with xBAM.CreateAllExt from Bulbs, Flashers, image lights .... with added "Ext" at end of object name) .SetLitColor red, green, blue .SetUnliteColor red, green, blue .SetPosition x,y,z, glowStaysWithModel .GlowRadius .DetachLight .Brightness .GlowBrightness .SetGlowColor red, green, blue .isOnBackbox .X .Y .Z .SpotLight radius, angleZ, angleX, softEdge .SetAttenuation constant, linear, quadratic .EnableRayCastShadows -------------------------------------------- Camera (from xBAM.Camera) .Mode .AspectRatio .ScriptControl .RequestForControl .DesktopSet eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay .DesktopRelease delay .DesktopSetLookAt eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay .DesktopSequenceBegin seqId .DesktopSequenceEnd .DesktopSequenceAddEntry eyeX, eyeY, eyeZ, atX, atY, atZ, fov, delay .DesktopSequencePlay seqId, loopFlag .CabinetSet tX, tY, tZ, sX, sY, sZ, rX, rY, rZ, delay .CabinetRelease delay .CabinetSequenceBegin seqId .CabinetSequenceEnd .CabinetSequenceAddEntry tX, tY, tZ, sX, sY, sZ, rX, rY, rZ, delay .CabinetSequencePlay seqId, loopFlag -------------------------------------------- Lights (from xBAM.Lights) .EnableNewRenderer (bool value: true/false, can be SET and READ) .MainLightLock (bool value: true/false, can be SET and READ) .EnablePostprocessing (bool value: true/false, can be SET and READ) .SetMainLightPosition x, y, z .SetMainLightProperties size, diffuse, specular, ambient .SetMainLightAttenuation constant, linear, quadratic .SetOtherLightsAttenuation constant, linear, quadratic .SetPostprocessing contrast, brightness, gamma, saturation .SetPostprocessingForNewRenderer contrast, brightness, gamma, saturation, srcGamma, srcSpecular, outDiffuse, outSpecular, outSepecularColor .Backup .Restore .Brightness .GlowBrightness .LockGlowBrightness .LockFlasherBrightness .BallReflection .BallShininess .BallSpecular .BallBrightness -------------------------------------------- Gif (from xBAM.LoadGif) .ReplaceTexture textureName .NumFrames - READONLY returns number of frames in gif .CurrentFrame .StepForward .UpdateInterval .Frame startFrame, endFRame, repeatFrame .Stop .RestoreTexture .SetTransparentColor red, green, blue .Solid