Soooo Hi 🙂
I thought I had this licked but as I was playing with it again last night I noticed that I don't and must be confused.
Can I use Every with Over/For, can I use multiple instances of For/Over?
Can I tell the script to
Chase(candycanes, Over (2) seconds, Every(5).Seconds);
Chase(Trees, Over(400).Milliseconds, Every(2).Seconds);
I would like to make the script a bit less verbose, tedious, complicated , blah.
So wondering if I can tell it to do something that takes X long, for the next 10 minutes, for example.
In want to chase my candycanes over a 5 minute time table, but the chase sequence should take no more than 2 seconds. (ya I guess I can continue to just check the time and have differing things happening based on the time)
Same with the trees.
How this started you ask? I am trying to create a New Years Countdown, where as my candycanes and trees will be the final 10 second countdown before my house erupts into chaos.. So I figure I have 12 canes, 4 tree wraps, If I light 2 canes at each second (6 seconds, each tree channel every 1 second, that's 10 seconds and than the house goes balistic (chaos and balistic ) 🙂
But prior to this I want to do some basic ramps, chases, etc but I would like to have them run for a set amount of time each, without having 10-15 identical lines.
BAHHH!H!H!H!H!H! I guess I just need to understand the relation of Every vs For/Over and am I missing one.
Thanks 🙂
Tory
From the wiki...
All assume to operate asynchronously; the action will return unless the Wait modifier is used (below).
* void On(channels, modifiers);
* void Off(channels, modifiers);
* void Ramp(channels, int startIntensity, int endIntensity, modifiers); // Intensities are 0-100
* void Random(channels, int saturationLevel, modifiers); // Saturation level is 0-100
* void Chase(channels, modifiers);
[COLOR="Red"]"modifiers" is a params list made up of [COLOR="Blue"][U]0 or more[/U] [/COLOR]of the following:[/COLOR]
* At(int level) // Intensity level, 0-100
* For(int seconds) // Applies the action for the given time period.
* Over(int seconds) // Same as For(), just makes better sense in some uses.
* Wait // Wait for the action to complete.
* Every(int seconds) // Occurs at every time interval.
So according to that, it would seem that you can do what you want, it is just a matter of figuring out the syntax
I wonder though, if you could add a for statement in there as well... I dont know how Vixen would interpret it.
I am working on this, for some reason Vixen is not wanting to run scripts projects on my programming computer, I will update when I get it going.
Gebbinn wrote:From the wiki...All assume to operate asynchronously; the action will return unless the Wait modifier is used (below). * void On(channels, modifiers); * void Off(channels, modifiers); * void Ramp(channels, int startIntensity, int endIntensity, modifiers); // Intensities are 0-100 * void Random(channels, int saturationLevel, modifiers); // Saturation level is 0-100 * void Chase(channels, modifiers); [COLOR="Red"]"modifiers" is a params list made up of [COLOR="Blue"][U]0 or more[/U] [/COLOR]of the following:[/COLOR] * At(int level) // Intensity level, 0-100 * For(int seconds) // Applies the action for the given time period. * Over(int seconds) // Same as For(), just makes better sense in some uses. * Wait // Wait for the action to complete. * Every(int seconds) // Occurs at every time interval.So according to that, it would seem that you can do what you want, it is just a matter of figuring out the syntax
I wonder though, if you could add a for statement in there as well... I dont know how Vixen would interpret it.
I am working on this, for some reason Vixen is not wanting to run scripts projects on my programming computer, I will update when I get it going.
Exactly 🙂 I seem to have failed where it appears I should succeed.
Chase(Channel, For(400).Milliseconds, Every(1). Minute, Over(10).Minutes);
That seems like it would be ideal, the 400Milliseconds really get my trees dancing and a very clear chase, have this happen every 1 Minute, over a 10 Minute Span, but that's part of the rub, "Using For/Over (same meaning), twice in the same command). Even ignoring the second Over and ending with Every(1).Minute, still no joy. Odd
Please do let me know if you make some progress 🙂
Tory
Ok, I finally got my scripts to do what they should on my programming computer. Do not ask what the problem was, I ended up deleting all vixen files from the working computer, and copying the working vixen files from the show computer back to the programming one and got it working.
So, after all that, I have done some extensive testing on this, and have come to the conclusion that you cannot in fact insert Every() modifiers into Chase() Methods. I used this script
void Start() {
Off(All);
DateTime now = DateTime.Now; //get the current time
DateTime start = new DateTime(now.Year, now.Month, now.Day, 00, 30, 00);
DateTime end = new DateTime(now.Year, now.Month, now.Day, 23, 00, 00);
while (now.CompareTo(start) >= 0 && now.CompareTo(end) <= 0)
{
Chase(All, Over(5).Seconds, Wait);
}
Off(All);
}
It gives me a simple chase over 6 channels that takes 5 seconds to complete, and repeats over and over. However, when I change the arguments to this...
Chase(All, Over(5).Seconds, Every(30).Seconds, Wait);
Or this
Chase(All, Every(30).Seconds, Over(5).Seconds, Wait);
I get the exact same results in all 3 instances. This leads me to believe that the Chase() method does not recognize the Every() modifier. So, it would appear the solution to your problem is going to involve "verbose, tedious, complicated " scripting to execute.
My suggestion would be to use Switch() commands to execute. I am sure there are dozens of ways to do it, but I know that one fairly well, and it would be relatively easy to code.
I really wish I had more than a rudimentary knowledge of C#. I took 2 courses of it in college 8 years ago, but that just leaves me enough knowledge to break things. LOL.
Gebbinn wrote:Ok, I finally got my scripts to do what they should on my programming computer. Do not ask what the problem was, I ended up deleting all vixen files from the working computer, and copying the working vixen files from the show computer back to the programming one and got it working.So, after all that, I have done some extensive testing on this, and have come to the conclusion that you cannot in fact insert Every() modifiers into Chase() Methods. I used this script
void Start() { Off(All); DateTime now = DateTime.Now; //get the current time DateTime start = new DateTime(now.Year, now.Month, now.Day, 00, 30, 00); DateTime end = new DateTime(now.Year, now.Month, now.Day, 23, 00, 00); while (now.CompareTo(start) >= 0 && now.CompareTo(end) <= 0) { Chase(All, Over(5).Seconds, Wait); } Off(All); }It gives me a simple chase over 6 channels that takes 5 seconds to complete, and repeats over and over. However, when I change the arguments to this...
Chase(All, Over(5).Seconds, Every(30).Seconds, Wait);Or this
Chase(All, Every(30).Seconds, Over(5).Seconds, Wait);I get the exact same results in all 3 instances. This leads me to believe that the Chase() method does not recognize the Every() modifier. So, it would appear the solution to your problem is going to involve "verbose, tedious, complicated " scripting to execute.
My suggestion would be to use Switch() commands to execute. I am sure there are dozens of ways to do it, but I know that one fairly well, and it would be relatively easy to code.
I really wish I had more than a rudimentary knowledge of C#. I took 2 courses of it in college 8 years ago, but that just leaves me enough knowledge to break things. LOL.
Thank you sir, it's most appreciated that you took the time to take a look at this for/with me 🙂
umm Switch(), those 2 years are more than my few days of C(whatever) 🙂 hahahahaha.
Okay I'll take a look and see what can be done.
Thanks again and Happy Holidays!
Tory
LivermoreDad if you are still here, hop on chat for a minute, or PM me
