Results 1 to 10 of 15

Thread: Moving huds :D

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Brigadier General
    Join Date
    Oct 2012
    Posts
    998
    Thanks
    20
    Thanked 590 Times in 390 Posts
    Quote Originally Posted by Loveboy View Post
    Is there any way to do a shader from .alpha 0 to .alpha 1 in 5 secounds? I tried it and there is a problem, it just showed the shader instantly. If you try it on the default shader "black", then you will see, that it works. But not on own shaders. I tried already fadeOverTime(time) too, but it doesn't work, only on text.

    fadeOverTime() works on shaders as well.

    Example of a working fading server logo shader:

    PHP Code:
        if( isdefinedlevel.svrlogo ) ) level.svrlogo destroy();
            
        if( !
    isdefinedlevel.svrlogo ) )
        {
            
    level.svrlogo newHudElem(); 
            
    level.svrlogo.X
            
    level.svrlogo.Y;
            
    level.svrlogo.hidden false;
            
    level.svrlogo.alignX "left";
            
    level.svrlogo.alignY "top";
            
    level.svrlogo.horzAlign "fullscreen";
            
    level.svrlogo.vertAlign "fullscreen"
            
    level.svrlogo.archived false;
            
    level.svrlogo.hideWhenInMenu true;
            
    level.svrlogo setShadergame"demonlogo" ], W);
            
    level.svrlogo.alpha 0;
        }
            
        for( ;; )
        {
            
            
    wait looptime;
            
            if( 
    isdefinedlevel.svrlogo ) ) level.svrlogo fadeOverTime);
            if( 
    isdefinedlevel.svrlogo) ) level.svrlogo.alpha .7;
            
            
    wait screentime;
            
            if( 
    isdefinedlevel.svrlogo ) ) level.svrlogo fadeOverTime);
            if( 
    isdefinedlevel.svrlogo ) ) level.svrlogo.alpha 0;
        } 

  2. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (25th March 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •