Is there a way to get the snow/rain plugin load in a scene and get removed after (for example) 10 seconds?
snow/rain plugin timeout
-
-
Hi,
it depends a bit on your exact needs, but this works:
Code
Display More<scene name="scene_1" title="a1" onstart="" autoload="true"> <preview type="grid(cube,64,64,512,0x666666,0x333333,0x333333);" details="16"/> <view hlookat="0" limitview="off" /> </scene> <plugin name="snow" zorder="1" keep="true" url="plugins/snow.js" floor="0.7" onloaded="snowballs();" /> <action name="snowballs"> set(plugin[snow], mode=image, imageurl='snowball.png', blendmode=normal, flakes=2000, imagescale=0.5, speed=1, shake=4, speedvariance=2, spreading=2, wind=0, invert=false floor=0.7 ); delayedcall(4, tween(plugin[snow].alpha,0,2,,removeplugin(snow)); ); </action>
.. after 4 seconds we slowly make the snow transparent and then we remove the plugin..
but as said.. it depends what you exactly want.
Perhaps you need:Hope it helps,
Tuur -
Thanks a lot for this gift Tuur.
It works beautifully well.
Merry Christmas and Happy New Year to all! -
Hi,
it depends a bit on your exact needs, but this works:
Code
Display More<scene name="scene_1" title="a1" onstart="" autoload="true"> <preview type="grid(cube,64,64,512,0x666666,0x333333,0x333333);" details="16"/> <view hlookat="0" limitview="off" /> </scene> <plugin name="snow" zorder="1" keep="true" url="plugins/snow.js" floor="0.7" onloaded="snowballs();" /> <action name="snowballs"> set(plugin[snow], mode=image, imageurl='snowball.png', blendmode=normal, flakes=2000, imagescale=0.5, speed=1, shake=4, speedvariance=2, spreading=2, wind=0, invert=false floor=0.7 ); delayedcall(4, tween(plugin[snow].alpha,0,2,,removeplugin(snow)); ); </action>
.. after 4 seconds we slowly make the snow transparent and then we remove the plugin..
but as said.. it depends what you exactly want.
Perhaps you need:Hope it helps,
Tuur
If you set this for your winter months, with date control, it will be fine if it snows in winter (december, january, february) and not in other months :)
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!