Visual Pinball > VP Tools

Want perfect EM bells? Here's how

(1/1)

Itchigo:
What I mean by this is if you have a "500" sound, rather than splicing 5 "100" sounds together (as I used to do), you can do things this way.

What we're going to do here is make one sound repeat with a timer.


DimX  'Put this at the top of the script.
X=0

Sub Createsound_Timer

X=X+1               'We are adding 1 to the variable until we reach 5.
Addscore 100
Playsound"100"
CreatesoundTimer.Enabled=True   'Restart the timer.

If X=5 Then
CreatesoundTimer.Enabled=False  'When we reach 5 then shut off the timer and exit.
X=0                                                'Reset X to 0
End If
End Sub

Now add a timer, name it Createsound, and uncheck enable. The timing of how fast the sounds repeat is in the timer itself. This is a "master" sub, so for anything scoring this amount- just call this timer.  Createsound.Enabled=True

Pintrepid:
E =MC2 / the root of π  :Green:

ndiniz:
+5^2+365/24*7/30 equals fish! LOL! :Content: :Content: :Content: :Content: :Wink: :Wink:

Navigation

[0] Message Index

Go to full version