- This topic has 15 replies, 6 voices, and was last updated 7 years, 6 months ago by RustyCardores.
-
AuthorPosts
-
October 10, 2016 at 6:48 am #38447
I’ll start by saying that “I know nothing about building tables”… but I can generally find my way around a script for a bit of cut and paste here and there.
So my question is, if a table doesn’t have the low level “bump” sound on post rubbers, can it be easily added in a global kinda way or is it a matter of doing something for each and every post rubber?
I ask because I’m using sound driven tactile feedback and the tables that have the post rubber “bump” sound, have that extra bit of realism to them. In fact, playing a table without them feels a bit odd now, so I would love to add them to some of my favourite tables if possible.
Cheers, Rusty.
You need to login in order to like this post: click here
October 10, 2016 at 7:23 am #38448Add all things you want to have that sound to a collection reference the name in collision sub in script for collision name. I think it’s usually rubbers for name of collection
********************************************************
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********************************************************
You need to login in order to like this post: click here
October 10, 2016 at 9:34 am #38455If you look most table scripts have default sounds scripted in (from a table->new for example) there is the following script.
If you create a collection called for example Targets – and make it “Fire events for the collection”, it will perform this function for each hit & object in that collection.
You were looking for Posts – so see that script below. Of course this assumes you have the related sound “<filename>” in the sound manager as well.
Sub Targets_Hit (idx)
PlaySound “target”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub
Sub Metals_Thin_Hit (idx)
PlaySound “metalhit_thin”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
Sub Metals_Medium_Hit (idx)
PlaySound “metalhit_medium”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
Sub Metals2_Hit (idx)
PlaySound “metalhit2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
Sub Gates_Hit (idx)
PlaySound “gate4”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub
Sub Spinner_Spin
PlaySound “fx_spinner”,0,.25,0,0.25
End Sub
Sub Rubbers_Hit(idx)
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 20 then
PlaySound “fx_rubber2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 20 then
RandomSoundRubber()
End If
End Sub
Sub Posts_Hit(idx)
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 16 then
PlaySound “fx_rubber2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 16 then
RandomSoundRubber()
End If
End Sub
You need to login in order to like this post: click here
October 10, 2016 at 2:51 pm #38461thanks guys. It’s 5am here, give me a bit to wake up and down a few coffees and I’ll try and figure it out. ;)
btw…. I did say to myself yesterday that I wasn’t going to “spend any time on the pinCab today and that I was going to do some real work”…. looks like work will have to wait for another day. ;)
You need to login in order to like this post: click here
October 10, 2016 at 2:54 pm #38463Great topic. How about adding the flipper rubber collision sound that’s featured on many of JP’s tables? Similar process? I love those sounds.
You need to login in order to like this post: click here
October 10, 2016 at 3:06 pm #38465Nearly all tables have the sounds, the collections, with the corresponding scripting – they’re all elements in the default table. So it’s easy to fix. Check that the sound collections aren’t empty (f8 brings up the collection menu) and make sure all the individual objects in the collection have ‘has hit event’ checked.
You need to login in order to like this post: click here
1 user thanked author for this post.
October 10, 2016 at 3:48 pm #38467I don’t have any checkboxes for hit events in the collection menu. Maybe I am misunderstanding where I should be looking?
You need to login in order to like this post: click here
October 10, 2016 at 4:21 pm #38474On the objects themselves under ‘Physics’, every wall/primitive/rubber in the collection has to have ‘has hit event’ checked
You need to login in order to like this post: click here
October 10, 2016 at 4:51 pm #38481Ok, thanks for the info Fozzy.
You need to login in order to like this post: click here
October 10, 2016 at 8:46 pm #38500Cheers Fozzy, I’ll see what I can do.
You need to login in order to like this post: click here
October 11, 2016 at 4:13 pm #38528I don’t have any checkboxes for hit events in the collection menu. Maybe I am misunderstanding where I should be looking?
What I would do is double check – verify – add a msgbox “Sound was called” line in the various scripts to ensure they are being called.
Once you verify then of course remove the msgbox line.
Sub Posts_Hit(idx)
dim finalspeed
msgbox “Posts_hit”
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
etcYou need to login in order to like this post: click here
October 11, 2016 at 8:53 pm #38541OK I have added the sound.
I have checked the sound collection (F8) is not empty
I have checked that all items within that collection has “has hit event” ticked.
Now, looking at the script I noticed that there was nothing like the following that I see in other tables right above the RandomSound portion of the script….
Sub Posts_Hit(idx)
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 16 then<
PlaySound “fx_rubber2”, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 16 then
RandomSoundRubber()
End If
End Sub
So I had a crack at adding the above. The table plays, but as soon as a ball makes contact with one of the posts, I get a Variable Undefined ‘vol’ error message.I’m probably way off the mark as to what I should be doing, but in my defence I did mention right at the beginning that I have no clue about building tables. lol
You need to login in order to like this post: click here
October 11, 2016 at 8:55 pm #38543In VPX do a table new – and look at the scripts there. The examples I pasted here come straight from there.
I didnt paste all the supporting scripts – again they are in the “table new” script. So grab them from there.
You need to login in order to like this post: click here
1 user thanked author for this post.
October 11, 2016 at 8:59 pm #38544Sounds like you didn’t copy the complete collision/rolling script.
********************************************************
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********************************************************
You need to login in order to like this post: click here
October 11, 2016 at 9:40 pm #38545I have it working now. I simply removed everything after PlaySound “fx_rubber2” and went straight to End Sub
You need to login in order to like this post: click here
October 21, 2016 at 11:55 pm #39396I’ve just added bump sounds to a recently updated table and … if you allow to veer a little off topic… it reminded me of something I tried to figure out how to do ages ago.
I’m not sure if I asked it here or on another forum, but what I want to do, is have 2 “sound events” for one “collision event”. The reason being, is that I want ONLY my bumper sounds to play across two sound devices. (yeah I know…. it’s to do with that darn Poor Man’s DOF that I bang on about all the time. I want to hear the bumpers from the back of the cab, as well as hear and feel them from the front tactile drivers)
I learned a little from this thread, so I tried a duplicating the bumper sound subs in the script and had them call a duplicate (renamed) version of the bumper sound (that I toggled to the secondary output), but that didn’t work. It simply played the duplicate routine. :(
Anyone got any ideas on this and if it’s even possible?
You need to login in order to like this post: click here
-
AuthorPosts
Forums are currently locked.