Randomising Pictures (1 Viewer)

m.standish

Portal Pro
July 9, 2006
174
8
Wakefield
Home Country
United Kingdom United Kingdom
Is there any command for .xml to choose a random picture

Im trying to make the skin choose a random .jpg to display as the background in the home screen, (with a view to creating a plugin to be able to select which photo in the future)

The only other way i can think is to set the pic as say "background.jpg" and running some external app to change the filename to this at a set period but id rather not do that.

Any ideas guys?
 

mofux

Portal Designer
  • Premium Supporter
  • January 27, 2006
    678
    34
    Dresden, Germany
    sorry, that's not possible, even not with the "change background.jpg" idea as the background is compiled into the packedgfx*.png files when you start MP... a good way is to do it like harley did in PMIII and just take the currently playing coverart as background (#Current.Play.Thumb)
     

    m.standish

    Portal Pro
    July 9, 2006
    174
    8
    Wakefield
    Home Country
    United Kingdom United Kingdom
    If i also deleted the cached package when i rename files that would work wouldnt it?
    Using coverart wouldnt be appropriate as the picture is showing behind the basic home buttons and it would look really screwey on most images. they have to be pretty standardised else they interfere with the icons. Ive found the best ones are landscape pics, coverart would not really be an option. Thanks tho! :)
     

    mofux

    Portal Designer
  • Premium Supporter
  • January 27, 2006
    678
    34
    Dresden, Germany
    well, even if you delete the packedgfx you won't get mp to recompile the gfx once you've changed the background image - i guess it will hold the background.png in memory then...
     

    mofux

    Portal Designer
  • Premium Supporter
  • January 27, 2006
    678
    34
    Dresden, Germany
    just got an idea... you could make an animation out of png files and just let it play with a very small framerate...
    have a look on the common.*animation.xml files in the blue2 folder, it should give you a hint on what to do
     

    m.standish

    Portal Pro
    July 9, 2006
    174
    8
    Wakefield
    Home Country
    United Kingdom United Kingdom
    Ah ok, will do.
    Should point out BTW, ive only just started with all this skinning stuff, and i know even less about c#, still trying to change & recompile so music dosent stop when you run a game rom through My programs LOL
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom