2 things xD need help from someone good with scripts<3

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Xenon
CJ Newbie
CJ Newbie
Posts: 57
Joined: December 29th, 2011, 12:42 am
Gamertag: Xenon iz Dubby

2 things xD need help from someone good with scripts<3

Post by Xenon » April 11th, 2012, 1:05 am

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 :D ... 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

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: 2 things xD need help from someone good with scripts<3

Post by Drofder2004 » April 11th, 2012, 1:10 am

Just create a hud element, make it the size of the screen and fill it with the colour and alpha of your choice.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Xenon
CJ Newbie
CJ Newbie
Posts: 57
Joined: December 29th, 2011, 12:42 am
Gamertag: Xenon iz Dubby

Re: 2 things xD need help from someone good with scripts<3

Post by Xenon » April 11th, 2012, 2:14 am

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 :))))

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: 2 things xD need help from someone good with scripts<3

Post by Rezil » April 11th, 2012, 8:07 am

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;
}
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Xenon
CJ Newbie
CJ Newbie
Posts: 57
Joined: December 29th, 2011, 12:42 am
Gamertag: Xenon iz Dubby

Re: 2 things xD need help from someone good with scripts<3

Post by Xenon » April 11th, 2012, 3:15 pm

still confused as S*** ..... hahahhahaha i understand it all .. cant get it to work tho :(

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: 2 things xD need help from someone good with scripts<3

Post by Rezil » April 11th, 2012, 3:23 pm

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.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Xenon
CJ Newbie
CJ Newbie
Posts: 57
Joined: December 29th, 2011, 12:42 am
Gamertag: Xenon iz Dubby

Re: 2 things xD need help from someone good with scripts<3

Post by Xenon » April 11th, 2012, 3:36 pm

ahhhhhhh okay :)))

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests