- Joined
- Jun 21, 2020
- Messages
- 2,036
- Solutions
- 1
- Reaction score
- 1,194
- Points
- 125
- Favorite Pinball Machine
- Indiana Jones
I asked Rav if there was a way to simulate a drop target bank for when you don't want or can't to use drop target banks, like with FizX.
Here is the needed code to do it. I commented it here but as an attachment i'll leave the table Rav did with the full example
Here is the needed code to do it. I commented it here but as an attachment i'll leave the table Rav did with the full example
Code:
' support Sub to define a new _hit Sub name that is able to process Hit events
' In this case it'll be to simulate a DropTaget Bank of 5 targets
Sub SetHitSub(DTs, hitSubName)
Dim i
For i = 1 To UBound(DTs)
ExecuteGlobal "Sub " & DTs(i).name & "_hit(): " & hitSubName & "(" & i & "): End Sub"
Next
End Sub
' Define the wall "targets" for FizX - "bring to front" of the actual drop targets in the GUI
Dim DTs(5) ' array for DT walls
Set DTs(1) = DT1 : Set DTs(2) = DT2 : Set DTs(3) = DT3 : Set DTs(4) = DT4 : Set DTs(5) = DT5
' The normal Sub _hit that process the hit events
Sub DTs_Hit(idx)
' debug info
AddDebugText "DTs_Hit! " &_
"name = " & DTs(idx).name &_
", idx = " & idx &_
", fpEvendId = " & fpEventId
' insert what to do below
End Sub
' set "DTs_hit" as the name of the Sub that processes wall hit events
SetHitSub DTs, "DTs_Hit"