Kodi Community Forum

Full Version: Make an image and animation display on certain weather conditions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been trying to get a full screen image of rain drops...

Image

and an animated rain drop...

Code:
<include name="AnimatedBackgroundEffect">
    <control type="group">
        <visible>!Skin.HasSetting(HolidayEffects) + Skin.HasSetting(EnableRainDropEffect) + !Player.HasVideo</visible>
        <include>VisibleFadeEffect</include>
        <control type="image">
            <description>Raindrop 5 animation</description>
            <left>200</left>
            <top>150</top>
            <width>128</width>
            <height>128</height>
            <texture background="true">BackgroundEffect/rain-drop.png</texture>
            <visible>true</visible>
            <colordiffuse>BBFFFFFF</colordiffuse>
            <animation type="conditional" reversible="false" loop="true" condition="true">
                <effect type="fade" delay="2000" start="0" end="100" time="200" />
                <effect type="fade" delay="2500" start="100" end="0" time="500" />
                <effect type="zoom" delay="2000" start="30" end="500" time="1000" center="auto" tween="quadratic" />
            </animation>
        </control>
    </control>
</include>

to display only when it's raining outside.

I've been trying to tie this into the weather current conditions to no avail. The user psike had some success here. I think this would be a cool effect to have for when it's raining or snowing outside. I'm hoping someone here smarter than me feels the same. Haha.
I haven't played with the weather portion so much yet, but could you have it checked the weather type as your animation or visibility setting... maybe a onload set property to a weather condition?
The Easiest way would be to check against the $INFO[Weather.FanartCode] infolabel.

e.g.
Code:
<visible>Integer.IsEqual(Weather.FanartCode,11) | Integer.IsEqual(Weather.FanartCode,12)</visible>

There are quite a few for rain, so you would have to make sure to include them all. You can see what the codes are for different weather conditions in this wiki page:
http://kodi.wiki/view/Weather_addons#Weather_Codes
Howdy smitchell6879!

@jurialmunkey

That's exactly what I was trying to do...associate the images with certain FanartCodes. I tried the full screen rain drops with code 31 this morning and it works like a champ. Thanks Sir!
I see you still adding to the mq7... Your making that in to the main version of madnox with all then mods... Looks awesome as always.
Yeah, I haven't added anything new in a while, and I had this idea for weather effects the other day. Thanks bud!
Well I will keep a eye out and test it when you release.
@smitchell6879

I have the rain effect working with MQ 7. Here's a link to the post...

Rain Effects
Looks nice I like that actually rain falling
Thanks smitchell6879!