Jump to content



Photo
- - - - -

FlashForMs so maybe a FlasherForMs command


  • Please log in to reply
4 replies to this topic

#1 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,628 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 15 September 2016 - 06:14 AM

As I was mod'ing another FP table today for DOFLinx. I kept having to think through a lot of Flasher.FlashForMs commands as I added a parallel FF_Flasher line for the physical flasher.  I was thinking is it worth having a small converter function to make this easier?  I could always add it to the next version of the base DOFLinx.vbs if it was thought to be worth while.

 

Currently the line

flasher1.flashforms 1000, 500, bulboff

has a second line added to run the physical flasher of

FF_Flasher DV_FLOL,FL_FL,2,50,100,"Orchid"

Obviously you need to add the additional information of the physical flasher to use, the colour (which I'm making the same as the one used on the table) plus the percentage brightness.  The bit that needs thought is translating the total on time and time per flash to the number of iterations and total time in hundredths as opposed to thousandths.

Perhaps a using a FF_FlasherForMS command could make this easier.  The above line would become

FF_FlashForMs 1000,500,bulboff,DV_FLOL,100,"Orchid"

The little bit of code to ensure the number of iterations is calculated to leave the flasher on / off the same as the table is

 

Sub FF_FlasherForMs(RunTime,FlashTime,EndWith,D,ThePerc,TheColour)
  Dim NumbIt
  NumbIt=round(RunTime/FlashTime)                           ' Calculate an integer for the number of iterations
  if ((NumbIt/2)-int(NumbIt/2))>0 then                      ' Check if there is an even number of iterations
   if (EndWith=bulbon) then                                 ' If its an even number of iterations and you want to leave the bulbon, then add one to make it uneven
      NumbIt=NumbIt+1
    end if
  else
   if (EndWith=bulboff) then                                ' If its an uneven number of iterations and you want to leave the bulb off, then add one to make it uneven
      NumbIt=NumbIt+1
    end if
   end if
  FlashTime=round(FlashTime/10)                             ' Convert the flash time total to 1/100th's
  FF_Flasher D,FL_FL,NumbIt,FlashTime,ThePerc,TheColour     ' Now use the existing DOFLinx function
End Sub

Happy to hear if its thought worthwhile to include this in the base vbs from next release.  Anyone could use this now by adding it to the table script with a different Sub name (so not to cause a conflict if it is added to the base vbs later).

 


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#2 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,003 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 16 September 2016 - 03:47 AM

Knowing you...this will definitely be a great option.  I have only done the flashers the old way... but yes, being able to have the "option" of matching the "intended" time for a flasher "automatically" (if I understand correctly) will save alot of testing time!

 

Sounds great.



#3 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,628 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 18 September 2016 - 11:54 AM

I think I'll add this into the next released version.  Then the option will exist for anyone to use.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#4 senseless

senseless

    Pinball Fan

  • Platinum Supporter
  • 513 posts

  • Flag: Netherlands

  • Favorite Pinball: T2, Black Knight 2K, Monster Bash

  • PS3 Gamer Tag: senseless_mind

Posted 20 November 2016 - 11:56 AM

This works really well and is quite doable to implement with tables :). The Phantom table will make full usage of this routine.



#5 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,003 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 21 November 2016 - 12:14 AM

This works really well and is quite doable to implement with tables :). The Phantom table will make full usage of this routine.

 

This is the command I first use with flashers before trying anything else. It does so much of the work for you.

 

Then I do my animated or manual flashers, next.

 

The only thing we really don't have is some kind of light sequence equivalent command.   (001011101011,etc)