- Joined
 - Jun 21, 2020
 
- Messages
 - 2,036
 
- Solutions
 - 1
 
- Reaction score
 - 1,198
 
- Points
 - 125
 
- Favorite Pinball Machine
 - Indiana Jones
 
So, I'm trying to add a feature to another table I'm doing and while in ball bonus (special case) that lasts for 30s. The problem is that the award in this mode is more... ball bonus (or 30s more) so I need to add time on top of a running timer.
I came up with a solution and it is working but to be honest I wonder if FP has an undocumented feature for this., some vbscript trick I can use instead and simply add more time :)
This is just example code for a solution I came up with not actual table code. Quite convoluted for what I think should a simple task... any ideias or should I simply go with this and call it a day?
	
	
	
		
				
			I came up with a solution and it is working but to be honest I wonder if FP has an undocumented feature for this., some vbscript trick I can use instead and simply add more time :)
This is just example code for a solution I came up with not actual table code. Quite convoluted for what I think should a simple task... any ideias or should I simply go with this and call it a day?
		Code:
	
	Sub trigger1_hit()
    if timer1.enabled = true then
        timer1.userdata = timer1.userdata + 1
        adddebugtext "userdata: " &timer1.userdata
     Else
        bulb1.state = bulbon
        timer1.set True, 5000
    End if
End Sub
Sub Timer1_expired()
    if timer1.Userdata > 0 then
        timer1.set True, 5000
        timer1.userdata = timer1.userdata - 1
        adddebugtext "userdata_expire: " &timer1.userdata
     Else
         timer1.enabled = false
         bulb1.state = bulboff
    end if
End Sub