Register    Login    Forum    FAQ    PinSimDB.org

Board index » Resources » Tutorials, how-to's, bug report and docs




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Coding Help
 Post Posted: Thu Apr 16, 2020 8:15 am 
Offline

Joined: Wed Apr 15, 2020 7:53 pm
Posts: 6
Location: Germany
Hi all

I found recently this software and was happy... Then i was Looking for specific pinball and didn t found it so i played few others end finaly decide to make one i didn t found... Looks grate have to say but that was easy part. Now understanding and writing Code is harder part and i Need bit help.

I have 4 trigers that are turning Lights, when ligts are all off Special light has to turn on and after hiting 4bank Dropdown Targets i should win free game and Special light has to turnoff.
I menaged to turn the Special light on and win free game just dont know how to Code that once the free game is won and Special Lights go off, how to Prevent it off turning on again because all Lights are off and as soon ball rolls over one of the trigers Special ligt turns on again.

P.S. New here and thank you so much all for your time and this software… It s prty time consuming… i do aprisiate… Thank you…. and sorry for my bad english...


Top 
 Profile  
 
 Post subject: Re: Coding Help
 Post Posted: Sun Apr 19, 2020 4:07 pm 
Offline
User avatar

Joined: Mon Aug 15, 2011 10:02 am
Posts: 1914
Location: Argentina
Gogo wrote:
Hi all

I found recently this software and was happy... Then i was Looking for specific pinball and didn t found it so i played few others end finaly decide to make one i didn t found... Looks grate have to say but that was easy part. Now understanding and writing Code is harder part and i Need bit help.

I have 4 trigers that are turning Lights, when ligts are all off Special light has to turn on and after hiting 4bank Dropdown Targets i should win free game and Special light has to turnoff.
I menaged to turn the Special light on and win free game just dont know how to Code that once the free game is won and Special Lights go off, how to Prevent it off turning on again because all Lights are off and as soon ball rolls over one of the trigers Special ligt turns on again.

P.S. New here and thank you so much all for your time and this software… It s prty time consuming… i do aprisiate… Thank you…. and sorry for my bad english...


what comes to my mind is add a condition for that.

Add anywhere
Dim SpecialWined

then at the reset of the table add
SpecialWined=false

And when the light have to turn on add
if SpecialWined=false then
turn it on blalbalba
end if

finally where you won the special add:

SpecialWined=true


Top 
 Profile  
 
 Post subject: Re: Coding Help
 Post Posted: Sun Apr 26, 2020 6:09 am 
Offline

Joined: Wed Apr 15, 2020 7:53 pm
Posts: 6
Location: Germany
Hi francisco666...!

Thanks for replay … Have found way around… :D I did it like this:

Sub TriggerK_Hit
If fpGameInPlay Then
AddDebugText "Trigger K Hit!"
AddBonus
PlaySound"fivetunehigh"
If (l_K.State = BulbOn) Then
AddScore(5000)
l_K.State = BulbOff
l_K1.State = BulbOff
checklights
set LastSwitchHit = TriggerK
Else
If (l_K.State = BulbOff) Then
AddScore(500)
set LastSwitchHit = TriggerK
End If
End If
End If
End Sub
for one of the triggers, and then i added this:

Sub checklights()
If (l_B.State = Bulboff) and (l_B1.State = Bulboff) and (l_U.State = Bulboff) and (l_C.State = Bulboff) and (l_K.State = Bulboff) and (l_K1.State = Bulboff) Then
If (lSpecial.state = bulboff) Then
lSpecial.State = BulbOn
drops3.set True,500
End If
End If
End Sub

Checked and works like charm…. :D

Any way now stuck with bonus in game trying hard to finde solution because i am programing for the first or second time... I get so far to collect the bonus 20k, multipler works perfect, and light lits on to colect in game bonus. Now have to write Code to collect the bonus and add it to the score playing Sound and lighting all the bonus Lights down from 20k to 1k.


Top 
 Profile  
 
 Post subject: Re: Coding Help
 Post Posted: Sun Apr 26, 2020 6:22 am 
Offline

Joined: Wed Apr 15, 2020 7:53 pm
Posts: 6
Location: Germany
Here few pics… It s not masterpiece…. but i like it...

[img][img]https://live.staticflickr.com/65535/49821124017_e82409c113_c.jpg[/img]Buck7 [/img]


Top 
 Profile  
 
 Post subject: Re: Coding Help
 Post Posted: Sun Apr 26, 2020 11:03 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2772
Location: Arkansas, USA
It looks good. I don't know enough about coding to be able to help.


Top 
 Profile  
 
 Post subject: Re: Coding Help
 Post Posted: Sun Apr 26, 2020 6:11 pm 
Offline

Joined: Wed Apr 15, 2020 7:53 pm
Posts: 6
Location: Germany
Hi George...!

Thanks anyway… :D


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Resources » Tutorials, how-to's, bug report and docs


Who is online

Users browsing this forum: No registered users and 4 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: