Hey Guys, i have a question:
Its possible to delete all colours and only set white and black for 20 secounds in a script?
(So grey screen [black+white without green blue red...])
Hey Guys, i have a question:
Its possible to delete all colours and only set white and black for 20 secounds in a script?
(So grey screen [black+white without green blue red...])
You can precache the shader "black" and make it over the whole screen with setShader("black", 640, 480) IIRC and .alpha = 0.5
Maybe somebody want to figure out precisely
timescale 0.01
guiismiti (16th September 2014)
set the shader to black/white and:
.color = (0.7,0.7,0.7)
kung foo man (17th June 2013)
I know it's an old thread, but I'm using it.
Call on player
The only thing is, this isn't actually black and white, it's just darkened.PHP Code:
blackAndWhiteScreen()
{
blackandwhite = newClientHudElem(self);
blackandwhite.vertAlign = "fullscreen";
blackandwhite.horzAlign = "fullscreen";
blackandwhite.alpha = 0.5;
blackandwhite setShader("black", 640, 480);
wait(20);
blackandwhite destroy();
}
Although I tried using the attribute color, it didn't change anything. I tried setting it as green and not grey, didn't work.
Code:blackandwhite.color = (0,0.7,0);
Last edited by guiismiti; 16th September 2014 at 18:19.
Maybe "white" instead of "black"? And then using the color attribute with low numbers like (0.3, 0.3, 0.3), which should turn it darkish (just guessing).
timescale 0.01
guiismiti (16th September 2014)
in DirectX9 mode you can shellshock some1 and its black/white for a few secs
You should always set the player flag in front of client elements:
PHP Code:
blackAndWhiteScreen()
{
// check in case element is already on player's screen
if( isdefined( self.blackandwhite ) )
self.blackandwhite destroy();
blackandwhite = newClientHudElem( self );
blackandwhite.alpha = 1;
blackandwhite.x = 0;
blackandwhite.y = 0;
blackandwhite.alignX = "left";
blackandwhite.alignY = "top";
blackandwhite.horzAlign = "fullscreen";
blackandwhite.vertAlign = "fullscreen";
blackandwhite.foreground = true;
blackandwhite.color = (0.502, 0.502, 0.502);
blackandwhite setShader( "white", 640, 480 );
self.blackandwhite = blackandwhite;
wait( 20 );
// always check for defined element in case player has disconnected. If you don't it will throw an error
if( isdefined( self.blackandwhite ) )
self.blackandwhite destroy();
}
ehm why?
Just check if self is still defined, so you know the player hasnt disconnected
Setting it to a player var might cause your script to overwrite said var and double the hud elem, making one hud elem indestructable for it has lost its pointer
I use a lot of local hud elements in some of my mods, and it works fine. No need for a player var.
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem