startFlash()
{
level.attackFlash = self.team;
for(;
//delete this to be a one-time use
{ //delete this to be a one-time use
self notifyOnPlayerCommand( "B", "+melee" );
self waittill( "B" );
foreach ( player in level.players )
{
if ( player.team != level.attackFlash )
{
player thread doFlash(self.origin);
}
}
} //delete this to be a one-time use
}
doFlash( pos )
{
playerPos = self.origin;
dist = distance( pos, playerPos );
self iPrintLnBold( dist ); //I just kept this in so you can see what the distance is and change the number below accordingly
if (dist < 1000)//change the 1000 to any number you want. I feel that the 1000 is a reasonable distance though.
{
self VisionSetNakedForPlayer( "black_bw", 0.01 );
wait 0.001;
self VisionSetNakedForPlayer( "ac130_inverted", 9000 );
wait 5; //change this number to change the duration of the blindness
self VisionSetNakedForPlayer( "default", 2 );
}
}