Pinball Nirvana Home Page

Go Back   Pinball Nirvana Forums > VP/VPM Help and Support > VP/VPM General Information and First Aid Station

VP/VPM General Information and First Aid Station Request Help about Visual Pinball or Visual PinMAME.

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-23-2019, 10:20 AM
fastdraw fastdraw is offline
Inserted Coin
 

Join Date: Dec 2015
Posts: 15
Credits: 750.88
Thanks: 7
Thanked 3 Times in 3 Posts
Rep Power: 0
fastdraw is on a distinguished road
Question code conversion

what is the conversion of this code to VP : DT= drop target : DTL= lumiere


resolved

had to replace drop target by a wall



Sub DT1_Hit()
AddScore 1000: DTL1.State = 1: DT1.SolenoidOn: CheckDT
End Sub

Sub DT2_Hit()
AddScore 1000: DTL2.State = 1: DT2.SolenoidOn: CheckDT
End Sub

Sub DT3_Hit()
AddScore 1000: DTL3.State = 1: DT3.SolenoidOn: CheckDT
End Sub

Sub CheckDT()
Dim x
If DTL1.State *DTL2.State *DTL3.State = 0 Then Exit Sub
For x = 1 To 3: Eval("DT" &x).SolenoidOff: Eval("DTL" &x).State = 0: Eval("DT" &x).PopDown: Next
End Sub

Sub PulseDT()
dt1.solenoidPulse:dt2.solenoidPulse:dt3.solenoidPu lse
End Sub

Last edited by fastdraw; 10-23-2019 at 12:07 PM.
Reply With Quote
  #2  
Old 10-23-2019, 10:30 PM
Ike Savage's Avatar
Ike Savage Ike Savage is offline
Pinball Porcupine
 

Join Date: Jun 2003
Posts: 3,450
Credits: 347,898.93
Thanks: 1,164
Thanked 700 Times in 548 Posts
Rep Power: 58
Ike Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to behold
Default

Man, 10+ years goes by fast.

It almost looks like you can now add colons ":" between contiguous statements now, like we used to do back with 8-bit BASIC, back in the day.

I guess this is one of the many new differences between VPX and older versions?
Reply With Quote
  #3  
Old 10-24-2019, 09:06 AM
fastdraw fastdraw is offline
Inserted Coin
 

Join Date: Dec 2015
Posts: 15
Credits: 750.88
Thanks: 7
Thanked 3 Times in 3 Posts
Rep Power: 0
fastdraw is on a distinguished road
Default

this code comes from fp,
I do not know the equivalence of popdown (FP) with vpx.
so the easiest way is to code the walls in DT. it's disarmingly simple.
there is a fpvpx script, which I do not know its usefulness?
maybe better compatibility for fp to vpx table conversion?
Reply With Quote
  #4  
Old 10-24-2019, 03:11 PM
Ike Savage's Avatar
Ike Savage Ike Savage is offline
Pinball Porcupine
 

Join Date: Jun 2003
Posts: 3,450
Credits: 347,898.93
Thanks: 1,164
Thanked 700 Times in 548 Posts
Rep Power: 58
Ike Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to beholdIke Savage is a splendid one to behold
Default

Quote:
Originally Posted by fastdraw View Post
this code comes from fp,
I do not know the equivalence of popdown (FP) with vpx.
"State = 0" in order to pop down a drop target IIRC.

I don't remember the ''solenoid" function in VP8.

But if you need ongoing script help in FP, I think you're better off asking at a site like this:
http://www.gopinball.com/forum/viewf...029952bdbe892b

The difference is that here, we mainly try to resolve issues running tables.
Reply With Quote
  #5  
Old 10-24-2019, 11:51 PM
shiva's Avatar
shiva shiva is offline
Pinball Wizard
 

Join Date: Oct 2004
Location: Abbotsford
Posts: 704
Credits: 78,684.49
Thanks: 2
Thanked 153 Times in 87 Posts
Rep Power: 24
shiva has a spectacular aura aboutshiva has a spectacular aura about
Default

Not sure about vpx but shivaengine had very simple routines and no eval or exeecute code, which will slow down a computer. Code will work for vp9.9. Your on your own after that.

From shivaengine1.8
ResetTargets() Goes in your New Ball subroutine

Code:
'********************************************
Rem ***         Drop Targets              ***
'********************************************
' Note, the TargetABCCheck sub is in the Reset and Checking Section
' after the Hit Event section

Sub TargetA_Hit() ' Target A was hit

    If tilt = False then				' If we don't tilt
		TargetA.IsDropped = True 		' Drop the target
	    PlaySound "targetdropping"
	    LightA.State = 1		 		' Light target A light
	    addscore 1000 				' Add 1000 points to the score
	    TargetABCCheck() 				' Check to see if all targets have been hit
    Else						' If we do tilt
    	TargetA.IsDropped = True 			' Drop the target
    	PlaySound "targetdropping"			' Play the sound, but no points or lights
    End If
    
End Sub ' End of Sub TargetA_Hit

'********************************************

Sub TargetB_Hit() ' Target B was hit

    If tilt = False then				' If we don't tilt
		TargetB.IsDropped = True 		' Drop the target
	    PlaySound "targetdropping"
	    LightB.State = 1		 		' Light target B light
	    addscore 1000				' Add 1000 points to the score
	    TargetABCCheck() 				' Check to see if all targets have been hit
    Else						' If we do tilt
	    TargetB.IsDropped = True 			' Drop the target
	    PlaySound "targetdropping"			' Play the sound, but no points or lights
    End If
    
End sub ' End of Sub TargetB_Hit

'********************************************

Sub TargetC_Hit() ' Target C was hit

    If tilt = False then				' If we don't tilt
	TargetC.IsDropped = True 			' Drop the target
	PlaySound "targetdropping"
	LightC.State = 1				' Light target C light
	addscore 1000 					' Add 1000 points to the score
	TargetABCCheck() 				' Check to see if all targets have been hit
    Else						' If we do tilt
	TargetC.IsDropped = True 			' Drop the target
	PlaySound "targetdropping"			' Play the sound, but no points or lights
    End If
    
End sub ' End of Sub TargetC_Hit


'********************************************

Sub ResetTargets() 'resets drop targets

    TargetA.IsDropped = False
    LightA.State = 0
    TargetB.IsDropped = False
    LightB.State = 0
    TargetC.IsDropped = False
    LightC.State = 0
    PlaySound "Targetup"
    
End Sub ' End of Sub ResetTargets

'********************************************

'*** Drop Target Check Routines ***

Sub TargetABCCheck() 							' Check if all targets have been hit

    If LightA.state = 1 and LightB.state = 1 and LightC.state = 1 then ' If they have then
 	   TargetsABCTimer.Enabled = 1 						'1 = True
    End If
    
End Sub

'********************************************

Sub TargetsABCTimer_Timer()
       ResetTargets() 							' reset the targets and
       BonusCollectLight.State = 2					' Turn on the light to collect bonus at Red Ramp BonusCollectKicker
       addscore 25000 							' award 25,000 points
       TargetsABCTimer.Enabled = 0 					'0 = False
End Sub

'********************************************
I meant to put in shivaEngine series here, see if I can put in 1.8 for you now. Oh, it also has a very simple multiball example as well as other stuff. Code should be easy to translate to vpx

EDIT: https://pinballnirvana.com/forums/do...o=file&id=5526
__________________

FaceBook Page for all my Rants,raves and projects
https://www.facebook.com/paul.sanderson.3745496
Next project: fpxEngine.

Last edited by shiva; 10-25-2019 at 12:58 AM.
Reply With Quote
The Following 2 Users Say Thank You to shiva For This Useful Post:
fastdraw (10-26-2019), Ike Savage (10-25-2019)
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:02 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Template-Modifications by TMS
Credits System provided by vBCredits II Deluxe (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Shoutbox provided by vBShout v6.2.15 (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.