Sub Load (VBSFile)

Viewing 20 posts - 1 through 20 (of 21 total)
  • Author
    Posts
  • #93973
    Joseph
    Participant
      @tarrega1

      Dear Forum,   I am using –    Sub Load(VBSfile) On Error Resume Next   If ScriptEngineMajorVersion < 5 Then MsgBox “VB Script Engine 5.0 or higher required” : Exit Sub ExecuteGlobal GetTextFile(VBSfile)) If Err Then MsgBox “Unable to open ” & VBSfile & “. Ensure that it is in the script folder or Tables folder ” & vbNewLine & Err Description : Exit Sub On Err Goto 0 End Sub  –

      –  to  Load approx 50 large “Q1EmHudTxtEngine.vbs” scripts and the load time takes a little longer than it would if the scripting is kept down to a minimum. All scripts load eventually and run without problems. Is there a newer VB Script Engine than the present 5 version that presently comes with Visual Pinball, which would improve the script load time

      ThankYou

      Joseph Gofton

      #93977
      randr
      Keymaster
        @randr
        ModeratorMember

        @fuzzel

        ********************************************************
        Messing with the VPinball app and push notifications.
        So if you haven't downloaded app yet what are you waiting for!?
        for IOS and Android

        ********************************************************

        #93997
        Joseph
        Participant
          @tarrega1

          What is a POP front end signature?

          #94029
          gtxjoe
          Participant
            @gtxjoe
            Member

            Its one of the many online features that PinballX has, that Pinup Popper does not support…       yet?

            #95500
            Joseph
            Participant
              @tarrega1

              Upgrading the Script engine did improve the Script Load Time.

              I,v noticed that Visual PinballX5s Timer is a little sluggish (adverse to activity or exertion) which is not good when you want to increment through a 50 row Array(50).

              Look forward to the next Upgrade.

              Many Thanks

              #95506
              Joseph
              Participant
                @tarrega1

                Script56 : Part Code only

                Dim Counter, Mynum,Qtext(50)

                Counter=0

                Mynum=51

                Do Until Mynum=0

                Mynum=Mynum-1

                Counter=Counter+1

                Dim QImage0

                If  Qtext(Counter)=”0″ Then

                for QImage0=Counter to Counter

                Eval(“Q1EmHudReel” & CStr(QImage0)).Image=”FontStyle_0″

                Next

                End If

                Loop

                might sort the Sluggish timer issue out. Just need to learn how to control it now! (Its a Crazy Script runner, distracted with desire or excitement)

                 

                #95805
                Joseph
                Participant
                  @tarrega1

                  Array increment with Eval Method

                  Running 50 EmReels with an Array(50) slows the EmReels down and conflicts with Visual PinballsX  Ball movement Physics when working the – for to – collective array code below. (EmReel(Array) will hold a start position for each EMReel.X)

                  For ArraySize= 0 to 50

                  EmReelInc(ArraySize)=EmReelInc(ArraySize)+1

                  Eval(“QEmReel” & CStr(ArraySize)).x=EmReelInc(ArraySize)

                  The single increment with Eval method

                  EmReelInc=EmReelInc+1 (will need to manufacture the different QEmReel start position before using this code) one EmReel.X position per EmReelInc (The QEmReels position needs to be setup first)

                  Eval(“QEmReel” & CStr(ArraySize)).x=EmReelInc

                  Next

                  The code above worked well with the Script56 – Do Untill -,  although the – Do Untill – did conflict with Visual PinballsX  Ball Physics. (Scripting is full of quirks!)

                  The long code did a better job

                  Separate increment for each EmReel method. The EmReel.X  positions can be stored in the EmReel increments below when you want to assign a X position to each EmReel.

                  EmReel1Inc=EmReel1Inc+1

                  EmReel2Inc=EmReel2Inc+1

                  EmReel3Inc=EmReel3Inc+1

                  EmReel1.x=EmReel1Inc

                  EmReel2.x=EmReel2Inc

                  EmReel3.x=EmReel3Inc

                  ########################

                  One increment for multiple Reels Method

                  EmReelInc=EmReelInc+1

                  EmReel1.x=EmReelInc

                  EmReel2.x=EmReelInc

                  EmReel3.x=EmReelInc

                  Next approach :

                  will put the EmReels into there different start positions first, followed by working the one EmReelInc for all EmReels (will need to manufacture the different QEmReel start position before using this code)

                  Only one EmReel.X position per EmReelInc (All QEmReel positions must be setup first)

                  Do not forget to declare your Dims if you are brave enough to give it ago!

                  #96062
                  Joseph
                  Participant
                    @tarrega1

                    Eval(“QEmReel” & CStr(ArraySize)).Image=”Alpha_Image”   /  Code Conflict

                    VisualPinballx 10.5 conflicts with Script56 Eval and Execute methods and should be avoided unless you have found a way around it.

                    Alternate Method

                    Dim QTextLen,QReelQuantity,Q_LenText,QEm_TextBox,QStart ,QReelNo(15),i

                    For  i= 1 to 15

                    QReelN0(i)=False

                    Next

                    Sub QAuto_Alpha_Image

                    Q_LenText=Len(QEm_TextBox)

                    QReelQuantity=15

                    QStart =Q_LenText+1

                    For  QTextLen = QStart to QReelQuantity

                    QReelN0(QTextLen )=True

                    Next

                    QAuto_Alpha

                    End Sub

                    Sub QAuto_Alpha()

                    If QReelN0(1)=True Then QEmReel1.image=”Alph_Image” End If

                    If QReelN0(2)=True Then QEmReel2.image=”Alph_Image” End If

                    If QReelN0(3)=True Then QEmReel3.image=”Alph_Image” End If

                    Up to 15

                    End Sub

                     

                     

                     

                    #99078
                    Joseph
                    Participant
                      @tarrega1

                      Eval/Execute avoidance method

                      Dim ReelNumber,ReelNo,ReelInc,QReel_Visibility_State_Position,QReelTracker(50)

                      ReelInc=1 : QReel_Visibility_State_Position=400

                      QReelTracker(1)=QReel1.X : QReelTracker(2)=QReel2.X : QReelTracker(3)=QReel3.X

                      ReelNumber=Array(QReel1,QReel2,QReel3)

                      Sub QReel_Visibility_State()

                      If QReelTracker(ReelInc)<QReel_Visibility_State_Position Then

                      ReelNumber(ReelInc).Visible=True

                      ReelInc=ReelInc +1

                      Next

                      End Sub

                       

                      #99081
                      Joseph
                      Participant
                        @tarrega1

                        The Eval/Execute avoidance method has not been tested yet (The post is just an uprising thought)!

                        Risk assessment Level : Not yet identified

                        #105269
                        Joseph
                        Participant
                          @tarrega1

                          Look forward to VP 10.6  upgrade.

                          Do any of you have a written example of a ball on the table ID(int) code which assigns a unique identification number to a ball on the table?

                           

                          #105274
                          Thalamus
                          Moderator
                            @thalamus
                            ContributorMemberModerator

                            There are a few tables – Robocop is one I think.

                            #105275
                            randr
                            Keymaster
                              @randr
                              ModeratorMember

                              Ha ha

                              Three angels has it as does mad scientist

                              ********************************************************
                              Messing with the VPinball app and push notifications.
                              So if you haven't downloaded app yet what are you waiting for!?
                              for IOS and Android

                              ********************************************************

                              #105323
                              Joseph
                              Participant
                                @tarrega1

                                Thank You Thalamus and Randr,

                                The Visual Pinball code method  ID(Int), which gets a unique ID/identification number for each ball created or allows you to set an artificial identification number for each ball created, was not being used by the Three Angels Script writer.

                                However, the three Angles script writer did use VisualPinballs following code method,

                                If ActiveBall.Image = “bo” Then

                                End If

                                so that the Three Angles script writer could identify if the ball was loaded with a Black image.  I was unable to get VisualPinballs code method ActiveBall.Image = “bo” to acknowledge the Black image after testing the code. More research needed!

                                Thank You once again

                                 

                                 

                                #105341
                                Joseph
                                Participant
                                  @tarrega1

                                  Dear forum ,

                                  Does anyone have a direct email link to the Visual Pinball Code writers so that i can iron out the code below?

                                  Visual Pinball code method

                                  ID(Int), which gets a unique ID/identification number for each ball created or allows you to set an artificial identification number for each ball created.

                                  Thankyou

                                  Joseph

                                  #105345
                                  randr
                                  Keymaster
                                    @randr
                                    ModeratorMember

                                    Pm toxie or fuzzle you can find their profiles under member search from to dropdown nav menu top of every page or I will try to link them here…

                                    https://www.vpinball.com/all-vpb-users/

                                    https://vpinball.com/all-vpb-users/toxie/

                                    https://vpinball.com/all-vpb-users/fuzzel/

                                    ********************************************************
                                    Messing with the VPinball app and push notifications.
                                    So if you haven't downloaded app yet what are you waiting for!?
                                    for IOS and Android

                                    ********************************************************

                                    #105770
                                    Joseph
                                    Participant
                                      @tarrega1

                                      Subject :  reference my comment dated NOVEMBER 30, 2018 AT 11:58 AM

                                      The Visual Pinball code method  ID(Int), which gets a unique ID/identification number for each ball created or allows you to set an artificial identification number for each ball created, was not being used by the Three Angels Script writer.

                                      However, the three Angles script writer did use VisualPinballs following code method,

                                      If ActiveBall.Image = “bo” Then

                                      End If

                                      so that the Three Angles script writer could identify if the ball was loaded with a Black image.  I was unable to get VisualPinballs code method ActiveBall.Image = “bo” to acknowledge the Black image after testing the code. More research needed!

                                      Amendment to the above comment.

                                      The reason for not being able to acknowledge the Black image after testing the code was:

                                      I used image name “black” instead of using “bo” during my test.  I resolved the issue after changing the name to “bo”.

                                       

                                       

                                       

                                      #107225
                                      Joseph
                                      Participant
                                        @tarrega1

                                        FREECAD 3DModel Designer

                                        FreeCad is a must when looking for a playfield_Mesh hole cutter.  Use the sketch tool to create the hole shape.  FreeCad does not destroy the sketch that cuts the hole position.  This will enable you to re-edit the hole, allowing you to do more work on it after completing the cuts.

                                         

                                        Gapped Step procedure

                                         

                                        Prior Knowledge needed

                                        FreeCad Editor component parts

                                         

                                        1. Create a new document

                                        a. Activate Part Design by selecting it.

                                        b. select Create an Additive Primitive – Additive Box.

                                        c. In Combi View under Task or Under Object  select body and click on the box

                                        d. Size the mesh box to your playfield_mesh specifications

                                        e. Close the mesh box Tasks editor.

                                        2.  Activate Sketcher by selecting it.

                                        a. Click on create a new sketch, the new sketch icon sits in the toolbar and is identical to the sketcher icon.

                                        b. In control combo select model or stay with the Sketcher Tasks editer.

                                        d.  The construction mesh should now be visible.

                                        e. Pick up a sketcher tool shape/r, put it on the construction table or directly onto your playfield.  Put the sketch on the centre of construction table if you want to rotate the sketch shape from its centre of gravity.

                                        3. Close the sketcher task in Combo View.

                                        4.  Select Part Design.

                                        5.  In the Combo view Model editor put the sketch into the body if not already in there.

                                        6.  Highlight the Sketch and click on: Groove a Selected Sketch.

                                        a. Select Base X Axis or experiment until you get the right cut.  The hole cut will show if update view is checked.

                                        b. Click OK to complete the cut.

                                        7. To reposition or resize the cut

                                        a. Click once on the Sketch to Highlight it

                                        b. Use the property editor to reposition the sketch

                                        c. In Combo View Close the Tasks Editor

                                         

                                        Good practice Tips

                                        1. Keep the mesh object on the same Axis as the sketch construction table (Model properties/value editor will allow you to control the axis position).

                                        2.  The node must be highlighted prior to connecting when building shapes. Rotate the sketch view  if Node does not highlight, or work on the other side of the sketch and see if you can highlight the node from another position (Parallax attitude. – Increasing the size of the nodes can also help -)

                                        #107372
                                        Joseph
                                        Participant
                                          @tarrega1

                                          Reference the FreeCad Cut a whole in a Playfield mesh.

                                          Gapped Step procedure is based upon the level of FreeCad Editor Knowledge and being able to

                                          work the unpredictable program problems. (problem solving attitude – Analyze).

                                          FreeCad Bug Report Contact:  https://liberapay.com/FreeCAD/

                                          #107424
                                          Joseph
                                          Participant
                                            @tarrega1

                                            Free VPinball supplement program links

                                            Blender homepage https://www.blender.org/

                                            FreeCad  homepage  http://www.freecadweb.org

                                            Gimp homepage https://www.gimp.org/

                                            Krita  homepage https://krita.org/en/download/krita-desktop/

                                             

                                            Merry Xmas and when it arrives happy new year !

                                          Viewing 20 posts - 1 through 20 (of 21 total)

                                          Forums are currently locked.

                                          ©2024 VPinBall.com

                                          Log in with your credentials

                                          Forgot your details?