- This topic has 19 replies, 4 voices, and was last updated 4 years, 1 month ago by makmak.
-
AuthorPosts
-
March 4, 2020 at 6:44 am #165610
Hi, I need advice for the following: I am using a wall as a time limited “drain-protector” between the flippers. If its activated while a ball is there , the ball gets stuck (no surprise). Is there a way to avoid (besides creating a primitive and let it move up/down)? Thanks!
You need to login in order to like this post: click here
March 4, 2020 at 12:22 pm #165622drainwall.collidable = 1 / 0 ?
You need to login in order to like this post: click here
1 user thanked author for this post.
March 4, 2020 at 1:06 pm #165629What will happen to the ball if its set to 1 while the ball is directly over it? The same as like dropped 0/1 or will it jump?
I will also have a look at “Harley Davidson” table which has such an up-post (thats the right term I guess), if I recall right. I dont remember other tables with that feature…
You need to login in order to like this post: click here
March 4, 2020 at 3:14 pm #165632There’s really no good solution for this. Moving primitives don’t work.  Dropped walls will not cause the ball to jump. I typically address this by checking to see if there’s a ball over the object popping up and I use a timer to make it “jump”. You can see an example of this on the latest Skitso Medieval Madness with the trolls. I think someone also did something recently with drop targets, but I don’t remember which table.
Current Project: Perpetual updates of VPX physics.
You need to login in order to like this post: click here
1 user thanked author for this post.
March 4, 2020 at 3:27 pm #165633The champion pub has this up-post, just remembered. Never noticed strange behaviour on that table (but didnt play a lot). As far as I can see there is no special code to detect the ball location/ ball jump movement? I’ll try and replace my wall with this up-post to see if it works. Shouldnt be too much work.
You need to login in order to like this post: click here
March 4, 2020 at 3:35 pm #165640Sometimes the table logic is such that a ball can’t be over the post when it pops up.
Current Project: Perpetual updates of VPX physics.
You need to login in order to like this post: click here
March 5, 2020 at 1:10 am #165721True…havent thought about that. On my table the up-post will pop up at the end of a mode without hitting a dedicated target…so a ball might be on the up-post at that time. If I let the ball jump with the popping post, it might be pushed to the drain – thats the opposite effect of a ballsaver ;-). Therefore I need to check if there is any ball in the area and if so, delay the pop-up until its gone. As I have no clue about coding, can you help me with the part in the brackets? The rest should hopefully work…?
Sub endofmode()
Uppost
End sub
Sub uppost()
„If there is any ball with a x/y position within a circular area between x/y (center of post) and x + (radius_uppost + radius_ball) and y+ (radius_uppost + radius_ball) then wait 100ms then check again“
else
primitive_post.transY=45:post.image=“post_lit“
wallpost.isdropped=false:light_uppost.state=2
downpost.enabled=true
End sub
Sub downpost_timer()
primitive_post.transY=0:post.image=“post_dark“
wallpost.isdropped=true:light_uppost.state=0
downposttimer.enabled=false
End sub
Or is it all nonsense and I better use/create a dedicated target? (really not preferred and still a possible conflict if multiball is active…)
Thanks so much for your help!
You need to login in order to like this post: click here
March 5, 2020 at 2:17 am #165724Instead of checking for ball coordinates, I think you could put a trigger around your post with a variable. If your ball is in the trigger area, then your post won’t pop up.
You need to login in order to like this post: click here
1 user thanked author for this post.
March 5, 2020 at 2:27 am #165725You’re the best! Coding makes me thinking too complicated, this proves I am not good at it…
You need to login in order to like this post: click here
March 5, 2020 at 2:49 am #165729No one is born as coders ;)
You need to login in order to like this post: click here
March 5, 2020 at 4:14 am #165732OK, lets say i am not talented (in coding
You need to login in order to like this post: click here
March 5, 2020 at 5:56 am #165754Some more anti-talented question
I can set a trigger around the uppost, enable it and push post up if it was “unhit” (pretending it was hit before)
But how to check if the trigger wasnt hit at all (then push post up immediately)? I dont know a “sub bumpersensor_nothit()”…
Or do I just push up the post and at the same time check if the trigger is hit and pull down the post immediately again?
You need to login in order to like this post: click here
March 5, 2020 at 1:31 pm #165862I am really a terrible coder, but I would try it like this…
Run your post popup sub on a timer, that is looking to see if a ball is in the trigger area.
If there is no ball on the trigger, then the code runs as normal. End timer.
If there is a ball on the trigger, then keep looping the timer until there isn’t.
This should popup the post when the ball leaves the trigger area I think.
You need to login in order to like this post: click here
1 user thanked author for this post.
March 6, 2020 at 2:53 am #165945I had sth similar in mind, good to see someone else had the same idea, guess this will make it. I will try and report. Thanks!
You need to login in order to like this post: click here
March 8, 2020 at 6:53 am #166267Heres my solution. Probably possible with less lines but I dont know better and it seems to work. Will it also work with multiball?
There was still the problem that there is no function for “a trigger is not hit” at all. Therefore i had to invent a variable (“check”, with three values 0,1,2).
I needed two timers (1 for the duration of the up-post being up (“walltimer”), 1 for delay purpose(“sensortimer”), a trigger on the playfield on top of the up-post(“popsensor”), with a radius half a ballsize bigger than the up-post itself, and a variable called “check”. The sensortimer does the trick. We assume there is no ball around the up-post ( and set check=2) but first wait a glimpse to check if the trigger is hit (then check=1) (in the sub popupcheck) or if it was hit then wait unntil its unhit (check=0). If the trigger was not hit at all then just proceed with check=2 . If the trigger was hit, then wait a glimpse and check again:
Dim check
sub sthhappensthatleadstopopup-uptheup-post()
popsensor.enabled=true:sensortimer.enabled=true:check=2
end Sub
sub walltimer_timer()
if wall.isdropped=false then wall.isdropped=true:walltimer.enabled=false
end subsub popupcheck()
if check=0 then
wall.isdropped=false
walltimer.enabled=true
popsensor.enabled=false
end ifif check=2 then
wall.isdropped=false
walltimer.enabled=true
popsensor.enabled=false
end ifif check=1 then sensortimer.enabled=true
end Sub
sub popsensor_hit()
check=1:popupcheck
end subsub popsensor_unhit()
check=0:popsensor.enabled=false:popupcheck
end subsub sensortimer_timer()
sensortimer.enabled=false:popupcheck
end subYou need to login in order to like this post: click here
March 8, 2020 at 7:10 am #166272Good that you figured out a way to get it to work… Although I still don’t understand a couple of things with what you are doing..
1. On a real machine, if the ball happens to be on top of the popup post when it goes up.. it will roll off of the back of it and down into the drain, most likely.
2. How often is there actually a ball on it when the post pops up? (It can’t be too common)
3. I’ve tested a wall popping up into a ball on the playfield, and it doesn’t make the ball ‘stuck’ as you describe..  The wall pops up through the ball, and the ball continues to roll through it and down the playfield. (not realistic or correct, but not as you describe)
I would just code a simple trigger on top of the popup post, and if the ball happens to be on the post when it goes up .. change the balls z velocity and pop it up.
ActiveBall.VelZ=30
You need to login in order to like this post: click here
March 8, 2020 at 7:23 am #166279hmm, on my system the ball gets stuck “inside” the wall (maybe yours is not collidable?), then I have to stop the table manually.
Well, maybe it was bad luck, but the first time I have tried the bumper it happened to get stuck and since then several more times. Most likely table specific. Yes, on a real machine it would be a drainer, but i dont like drains (I am a really bad player…) and a pinball makes no sense if its much too hard (you want to see all the modes and “levels”) no?
You need to login in order to like this post: click here
March 8, 2020 at 7:32 am #166281Doesn’t happen very often in real that pinball’s are too easy, but, it does in VP if you ask me. Happy to see that things are going the right way for you though.
You need to login in order to like this post: click here
March 8, 2020 at 8:18 am #166297We´ll see, how many beaches you`ll be able to discover Â
You need to login in order to like this post: click here
March 11, 2020 at 1:33 am #166952Problem solved, my solution works very fine for me. Think we can close this topic. Thanks for your Help!
You need to login in order to like this post: click here
-
AuthorPosts
Forums are currently locked.