Author Topic: Need some scripting help  (Read 3517 times)

Offline DanHouston

  • Sr. Member
  • ****
  • Posts: 499
Re: Need some scripting help
« Reply #15 on: December 03, 2011, »
Can you put 2.1.1 back in place? I was running 2.1.4 and had other issues so I've gone back to 2.1.1.

I don't see anything wrong with that script....If I get a chance I'll change it to my lights and run it.


2011 - Year #1
    4000 lights and 16 channels
    5 Songs sequenced
2012 - Year #2
    5000 lights and 123 channels
    8 Songs sequenced

Offline jwilliams31

  • Sr. Member
  • ****
  • Posts: 145
    • Williams Family Christmas Lights
Re: Need some scripting help
« Reply #16 on: December 04, 2011, »
Before I do that, do you know if going back to 2.1.1 will have any negative effect on any of my profiles or sequences?
Einstein once said: "There are two things that are infinite; the universe and human stupidity. And, I'm not too sure about the universe."

Offline jwilliams31

  • Sr. Member
  • ****
  • Posts: 145
    • Williams Family Christmas Lights
Re: Need some scripting help
« Reply #17 on: December 04, 2011, »
Ok, I downloaded a clean copy of 2.1.1 and copied everything over to it.  I tried to run the script and it did the flashy thing with the lights and then Vixen crashed.
Einstein once said: "There are two things that are infinite; the universe and human stupidity. And, I'm not too sure about the universe."

Offline DanHouston

  • Sr. Member
  • ****
  • Posts: 499
Re: Need some scripting help
« Reply #18 on: December 05, 2011, »
Tricky one...It was coming back over the script so fast that the mod 20 was running repeatedly. Since I do things on odd/even minutes mine does not run into that issue. I put in a check to make sure we are not still on the same second as the last transition and it ran fine with my lights for over an hour before I stopped it.


Code: You are not allowed to view links. Register or Login
void Start() {

Off(All);
//***********************************************************************************************

DateTime now = DateTime.Now; //Gets the current time

ChannelCollection whiteLights;
ChannelCollection multiLights;

//*********************************************************************************************

whiteLights = Channels(Left_Magnolia___White,Right_Bradford___White);
multiLights = Channels(Left_Magnolias___Red___Multi,Right_Bradford_Pear___Red___Multi);

//*********************************************************************************************

int whiteOn;
int transitionSecond;
whiteOn = 0;
transitionSecond = 0;

//*********************************************************************************************

while (true) <= 0)
{
    if (now.Second % 20 == 0 && now.Second != transitionSecond)
{
transitionSecond = now.Second;
if (whiteOn == 0)
{
Ramp(Channels(multiLights), 60, 0, Over (10).Seconds);
Ramp(Channels(whiteLights), 0, 60, Over (10).Seconds);
whiteOn = 1;
}
else
{
Ramp(Channels(whiteLights), 60, 0, Over (10).Seconds);
Ramp(Channels(multiLights), 0, 60, Over (10).Seconds);
whiteOn = 0;
}
}
    now = DateTime.Now; //update the current time
  }
}
2011 - Year #1
    4000 lights and 16 channels
    5 Songs sequenced
2012 - Year #2
    5000 lights and 123 channels
    8 Songs sequenced