Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1065

Lua Scripting • Re: Snow with action timer?

$
0
0
Hello Ricardo, see if this can help you. To make it snow, you have to click on the ball.
If you also add a timer, like this one, setting the time you want it to work instead of starting at 0, you set the starting minutes. Works.

PD: Cambias setAndSave('StartTime', -1) por setAndSave('StartTime', 5) (por ejemplo 5 minutos) y lo tienes 5 minutos funcionando.
Thank you Carlotta, I'll check them out when I get on the PC :thumbup:

Technically speaking, you don't even need an ActionTimer to replicate what Initialize() and Update() do in Lua. Just an UpdateDivider=-1 first measure calling Initialize() or its equivalent function, and an OnUpdateAction on the Script measure that calls Update() or its equivalent function. This assumes the values of the relevant variables are passed correctly between Lua and the skin and viceversa, if needed.

I suggest to do your testing with a very basic script first, to make sure it works as needed, before trying to apply the same approach to the more complex snow script.
Interesting, didn't think about that. However, my main problem is that it uses Update=25 to work. What I was hoping to achieve with the action timer was to keep update on 1000 and use the repeat action thing to set its update to 25 while keeping the update 1000 on the skin. However when I tried it "works" but not as I expected.

Statistics: Posted by RicardoTM — Today, 4:06 pm



Viewing all articles
Browse latest Browse all 1065

Trending Articles