Page 1 of 1
2 things xD need help from someone good with scripts<3
Posted: April 11th, 2012, 1:05 am
by Xenon
basically .... i have an ocean

... not giving details away on my map;p ..... but when you fall into the ocean you get teleported to nearest place .... they all work

... its just i was wondering if anyone knows how i can put a dark blue fade o nthe teleport kinda like the effect of coming out of water ???????

)) please help <3 xenon
Re: 2 things xD need help from someone good with scripts<3
Posted: April 11th, 2012, 1:10 am
by Drofder2004
Just create a hud element, make it the size of the screen and fill it with the colour and alpha of your choice.
Re: 2 things xD need help from someone good with scripts<3
Posted: April 11th, 2012, 2:14 am
by Xenon
but like ... i mean after you teleport back to the land when u land n the sea xD ..... ive made it soo its blue underwater ... just i want liek a fade effect on the teleport

)))
Re: 2 things xD need help from someone good with scripts<3
Posted: April 11th, 2012, 8:07 am
by Rezil
Code: Select all
/*Precache "white" shader before you do anything!
Â
Call on a player, will create a client HUD element if it does not exist,
set the color to (<r>, >g>, >b>), fade from previous alpha value to <a> in <time>,
if <hud> is set to false, it will hide the HUD display. */
HUDFadeToBlue(time, hud, a, r, g, b)
{
    if(!isdefined(self.fadetoblue))
    {
        self.fadetoblue = newclienthudelem(self);
        self.fadetoblue.x = 0;
        self.fadetoblue.y = 0;
        self.fadetoblue.alignX = "left";
        self.fadetoblue.alignY = "top";
        self.fadetoblue.horzAlign = "fullscreen";
        self.fadetoblue.vertAlign = "fullscreen";
        self.fadetoblue.alpha = 0;
        self.fadetoblue.sort = 8000;
        self.fadetoblue.foreground = 1;
        self.fadetoblue setshader("white", 650, 480);
    }
    if(hud) self setclientcvar("hud_enable","1");
    else self setclientcvar("hud_enable","0");
    self.fadetoblack fadeovertime(time);
    self.fadetoblack.alpha = a;
    self.fadetoblue.color = (r, g, b);
    wait time;
}
Re: 2 things xD need help from someone good with scripts<3
Posted: April 11th, 2012, 3:15 pm
by Xenon
still confused as S*** ..... hahahhahaha i understand it all .. cant get it to work tho

Re: 2 things xD need help from someone good with scripts<3
Posted: April 11th, 2012, 3:23 pm
by Rezil
Precache white. Get player. Call HUDFadeToBlue(0.05, true, 1, 0, 0, 1); on player when he triggers the teleport, call HUDFadeToBlue(1, false, 0, 0, 0, 1); after the new origin has been set.
Re: 2 things xD need help from someone good with scripts<3
Posted: April 11th, 2012, 3:36 pm
by Xenon
ahhhhhhh okay

))