-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbasic.vbs
38 lines (33 loc) · 905 Bytes
/
basic.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Option Explicit
Randomize
ExecuteGlobal GetTextFile("controller.vbs")
Dim bFlippersEnabled
Sub Table1_Init
debug.print "Hello, World!"
'add a ball
bFlippersEnabled = True
End Sub
Sub Table1_KeyDown(ByVal Keycode)
debug.print "Down Keycode: " & Keycode
If keycode = LeftFlipperKey and bFlippersEnabled Then
LeftFlipper.RotateToEnd
End If
If keycode = RightFlipperKey and bFlippersEnabled Then
RightFlipper.RotateToEnd
End If
If keycode = PlungerKey then
Plunger.PullBack
End If
End Sub
Sub Table1_KeyUp(ByVal Keycode)
debug.print "Up Keycode: " & Keycode
If keycode = LeftFlipperKey and bFlippersEnabled Then
LeftFlipper.RotateToStart
End If
If keycode = RightFlipperKey and bFlippersEnabled Then
RightFlipper.RotateToStart
End If
If keycode = PlungerKey then
Plunger.Fire
End If
End Sub