Drop Targets too slow? (or probably my brain?) Rotatelanelights behave strange,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #165949
    makmak
    Participant
      @makmak
      Member

      Hi,

      I have a little problem with my skillshot-routine. There are 3 targets, one of them is lit. Hitting this one first leads to an award.

      All targets drop after any target is hit:

      for my 3 targets the code looks like this:

      Sub TargetSkill1_Hit()

      stopsound “Drum Roll”

      if lightPrim1.state=1 then

      awardskillshot

      else

      skillshotmiss

      end if

      End Sub

       

      My subs “skillmiss” and “awardskillshot” drop all targets and also set them all collidable=false

       

      Sub skillshotmiss()  Targetskill1.isdropped=true:Targetskill2.isdropped=true:Targetskill3.isdropped=true     Targetskill1.collidable=false:Targetskill2.collidable=false:Targetskill3.collidable=false

                      other lights, videos, things

      End Sub

      Sub AwardSkillshot()           Targetskill1.isdropped=true:Targetskill2.isdropped=true:Targetskill3.isdropped=true     Targetskill1.collidable=false:Targetskill2.collidable=false:Targetskill3.collidable=false

      other lights, videos and things

      End Sub

       

      Well, it happens regularly that both actions take place, those in “skillmiss” AND those in “awardskillshot”.

      The Targets are relatively (maybe 40-50 vpx-units) close to each other; it seems like its possible to hit two targets exactly at the same time?

      Is my system too slow? Are the targets too slow?

       

      I also sometimes have strange effects with my “rotatelanelights”:

       

      Sub RotateLaneLightsLeft()

      Dim wave

      wave = l1.State

      l1.state = l2.State

      l2.State = l3.State

      l3.State = l4.State

      l4.State = wave

      End Sub

       

      Sub RotateLaneLightsRight()

      Dim wave

      wave = l4.State

      l4.state = l3.State

      l3.State = l2.State

      l2.State = l1.State

      l1.State = wave

      End Sub

       

      Sometimes l3 stays lit (or unlit) all the time, although not all lights are lit altready. There is no other code doing anything to the lights except:

      sub kickerleft_hit()

      kickerleft.kick 0,55:Timerkickerleft.enabled=true:playsound “yahoo”

      PuPlayer.playlistplayex pBackglass,”videoballsaved”,””,0,1

      l1.state=0:l2.state=0:l3.state=0:l4.state=0:light_kickback.state=0

      kickerleft.enabled=false

      end sub

       

      sub Timerkickerleft_timer() ‘*** sets l1 in the kickerlane back to off after ball is kicked back

      timerkickerleft.enabled=false:l1.state=0

      end sub

      arent both “problems” somewhat strange?

      Any ideas? Thanks!!

      #166323
      BorgDog
      Participant
        @borgdog
        MemberContributorvip

        Are these targets using VP drop target objects or walls or something else?

        The reason I ask is that the drop targets have two seperate events, a dt_hit and a dt_dropped.  in almost all cases it is much better to use the _dropped for things like this. the _hit event happens when the ball hits the target, the _dropped event happens when the animation is complete, ie when the target is all the way down.

        Also I’m pretty sure your .collideable statements are redundant for most things as when object.isdropped=true then it is not collideable.

        not sure on the l3 staying lit, what you have should work, but it could maybe get confused with rapid left-right direction calls. does it act weird if you just go one direction?

        1 user thanked author for this post.
        #166447
        makmak
        Participant
          @makmak
          Member

          Thanks BorgDog, I know it was redundant to drop the targets AND set them colibale=false – that was my reaction on things going wrong. With collidable command being faster, I initially thought this was the better way to use for the skillshot to prevent two actions being triggered at the same time. But I will try out dropped-function only, if that is your suggestion. Right now I have just made the targets halfway smaller (they are invisible anyway cause you aim at primitives…), which made it happen less frequently, but with the consequence you might „hit“ the edge of a primitive (they are not collidable cause they will drop below the playfiled after the skillshot  (see #160606  ) and think you should have been awarded but in fact you just missed the invisible target. Again not satisfactory…

          For the rotatelanelights – it happened to be strange both ways. I tend to believe it was a corrupt USB-stick…!?! (although I did not use it to load tables from it). I threw it away now with this thing getting more slowly every time i wrote a file on it. Is it possible a defective USB-stick can have caused this??

          At the same time I deleted some vpmtimer.addtimer calls. Could this have been the cause???

          Anyway, since both actions I did not notice it again. I will have an eye on it…

          #166452
          BorgDog
          Participant
            @borgdog
            MemberContributorvip

            I wouldn’t think the usb nor the vpmtimer would cause the issues :unsure:

            i’m pretty sure I’ve only used the _dropped since it was added some time back, just less glitches.

             

          Viewing 4 posts - 1 through 4 (of 4 total)

          Forums are currently locked.

          ©2024 VPinBall.com

          Log in with your credentials

          Forgot your details?