Visual Pinball > VP Tools

Rosve's Fading Lights System

(1/3) > >>

rosve:
Here is a demo table and a description on how to use my fading lights code.
This system is specially made to make it easy to create really good looking lights on EM and original tables. It gives you much more control over the lights than the standard VP lights.

I have been using this code in tables like SPACE:1999, Red Dwarf, SkyRocket and many more.

DEMO TABLE DOWNLOAD

MANUAL (also included in the download)

- Add the Fading Lights code to the end of the table script.

- Create a new timer and name it "FLTimer". Set the interval to 33 and Enable it.

- Create a light somewhere besides the table and name it "DummyLight"

- Create 2 new collections, "L1" and "L2". Put the DummyLight in both collections.

- Make 3 playfield images with the   Lights Off,   Lights Halfe On,   Lights Full On.

- Add all the lights needed on the playfield (light1 - 14 on the demo table).
  On all the lights, Set the Off Image to the 'Lights Off' image. Set the On Image to the 'Lights Halfe On' image.

- Enter the lights into the "L1" collection.

- Copy and paste all the lights so that you get two lights in the same position.
  On all the new lights, Set the Off Image to the 'Lights Halfe On' image. Set the On Image to the 'Lights Full On' image.

- Enter the new lights into the "L2" collection.

- set the variable "FLMaxLight" (3rd line in the fading lights code) to the number of lights that you made. 14 in the demo table.


YOU ARE NOW READY TO USE THE FADING LIGHTS.
-------------------------------------------

- Insert this line in the table _Init sub to initialize the fading lights system,
  FLFlash 1, FLMaxLight, 0, 1, 4, 0



Use the following instructions to set a light (or a group of lights) ON, OFF or FLASHING


FLSetOn light1, light2, delay
   - Light number from Light1 to Light 2 is set to ON.
   - If the Delay is larger than 0 the code will wait the specified number of timer intervals before setting the lights ON.


FLSetOff light1, light2, delay
   - Light number from Light1 to Light 2 is set to OFF.
   - If the Delay is larger than 0 the code will wait the specified number of timer intervals before setting the lights OFF.



FLFlash light1, light2, repeats, on_duration, off_duration, delay
   - Light number from Light1 to Light 2 is set to FLASHING.
   - repeats is how many times the lights shall flash, 999 is continous flashing.
   - on_duration and off_duration specifies how many timer intervals the light shall stay on and off in the flashing cycle.
   - If the Delay is larger than 0 the code will wait the specified number of timer intervals before setting the lights to FLASHING.




EXAMPLES
--------

Set light 4 on.
     FLSetOn 4, 4, 0

Set light 3 to 6 on after a small delay,
     FLSetOn 3, 6, 10

Set light 4 off.
     FLSetOff 4, 4, 0

Flash light 6 three times,
     FLFlash 6, 6, 2, 2, 4, 0

Flash all light one time
     FLFlash 1, FLMaxLight, 0, 1, 4, 0

unclewilly:
Very nice.
I appreciate this,  will save a bunch of time on my 2 original projects

Itchigo:
Thanks Rosve!

rosve:
Forgot to show how my code can also control the alpha flashers.
NEW DEMO
I made another light (#15) that is connected to a flasher.

unclewilly:
I havent had a chance to look at this yet rosev as ive been working all weekends.
Is it set up in subroutines like jps system so we can do custom light scripts and alpha flashers?

Thanks again for this

Navigation

[0] Message Index

[#] Next page

Go to full version