I've updated this to 1.0 version.
For those that are interested, I've created a script helper which will invoke xBam.Call asynchronously. Calling xBam.Call async like this enables one function to "use" xBam.Call for a time delay invoke and not have to worry about if the call to xBam.Call is "contained" within another xBam.Call.
Save the vbs file in same dir as table, then in the script for the table at the very top, put:
Note you can also just copy the class definition into your table script.
Then I put one timer object on my table. Note the name of the timer. In the example below I named my timer AsyncBamCallTimer but you can use whatever as long as you update the below. Add this code in BeginPlay:
Now in my calls where I used xBam.Call, I now use either of Inoke or InvokeWithArgs:
Updated code to support having multiple calls in same sub/function
At the Initialize of the object I use Execute to auto generate the Timer's Expired method, but apart from that it doesn't use Execute/Eval
For those that are interested, I've created a script helper which will invoke xBam.Call asynchronously. Calling xBam.Call async like this enables one function to "use" xBam.Call for a time delay invoke and not have to worry about if the call to xBam.Call is "contained" within another xBam.Call.
Save the vbs file in same dir as table, then in the script for the table at the very top, put:
C#:
ExecuteGlobal LoadExternalScript ("BamAsyncInvoke.vbs")
Then I put one timer object on my table. Note the name of the timer. In the example below I named my timer AsyncBamCallTimer but you can use whatever as long as you update the below. Add this code in BeginPlay:
C#:
Dim xBamAsync
Sub FuturePinball_BeginPlay()
set xBamAsync = (new BamInvoke)(AsyncBamCallTimer) 'AsyncBamCallTimer is a FP timer object
...
Now in my calls where I used xBam.Call, I now use either of Inoke or InvokeWithArgs:
C#:
xBamAsync.InvokeWithArgs "RotateTrunkTo", 300, cTrunkLight
' or
xBamAsync.Invoke "TrunkFrontHole_DestroyBall", 300
Updated code to support having multiple calls in same sub/function
C#:
xBamAsync.Invoke "TrunkFrontHole_DestroyBall", 300
xBamAsync.InvokeWithArgs "MakeSound", 600, "ding"
At the Initialize of the object I use Execute to auto generate the Timer's Expired method, but apart from that it doesn't use Execute/Eval