Author |
Topic: src_use_bw not working? |
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Sunday, Jan. 15, 2012 02:45 am |
|
Hi :)
Basically i got a script - it works fine but the problem is that it doesnt turn off?
sorry i forget what i am calling on its something like "src_use_bw" (turns the screen black & white)
Anyway, when the trigger is activiated it goes from src_use_bw 0 to src_use_bw 1 (and then screen goes black and white)
My problem is when i go through another trigger, it goes to "src_use_bw 0" (which should turn it back to black and white, but it doesnt!)
Sorry for the life of me i cant remember the command :L on iphone so cant look for scripts, but the script works fine its just that i cant turn it off, although i have managed to turn it off before i did that buy using "scr_use_contrast" (which turns the screen gold, again idk if thats right command) but when the screen turns gold, you notice the black and white fade even if its on then u turn it off urself, you notice the change
So is there another way to make black + white, or a way to turn it off?
Thanks, Ukdjaj |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Sunday, Jan. 15, 2012 12:10 pm |
|
The scripts are Code: main()
{
thread powers ();
}
powers()
{
trigger=getent("start","targetname");
while(1)
{
trigger waittill ("trigger");
wait (0.1);
SetDvar ("sf_use_bw", 1 );
}
}
Code: main()
{
thread power ();
}
power()
{
trig=getent("use_power_switch","targetname");
while(1)
{
trig waittill ("trigger");
wait (0.1);
SetDvar ("sf_use_bw", 0 );
}
}
and yes i am calling them up in my .gsc the problem is that the "sf_use_bw 0 command turns the command to "0" but does not turn off the black and white is there a way to get around this?
Thanks, Ukdjaj |
|
|
|
Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Monday, Jan. 16, 2012 12:14 pm |
|
Is this for SP or MP? If it's MP, you would probably be better off using a vision file everytime someone triggers the trigger, and then reset back to the map's default vision file when they trigger it off again. Vision files allow you to set Black and White by tweaking film elements like r_filmInvert.
You can set a vision file either on everyone on the map:
Code: VisionSetNaked( <nameoffile>, <time to set the file> );
Or on an individual player only:
Code: VisionSetNight( <nameoffile>, <time to set the file> );
Just create your own custom vision file and compile it in your map in a "vision" folder:
Code: rawfile,vision\yourcustomfile.vision |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Monday, Jan. 16, 2012 04:53 pm |
|
Its a zombie map so SP but i only want the colour to come and go at them triggers' activation so i dont think a vision file would be right for that:L
Just need to find the way around why it dont turn off wen u tell it too
Thanks, Ukdjaj |
|
|
|
Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Monday, Jan. 16, 2012 05:49 pm |
|
ukdjaj writes...Quote: Its a zombie map so SP but i only want the colour to come and go at them triggers' activation so i dont think a vision file would be right for that:L
Just need to find the way around why it dont turn off wen u tell it too
Thanks, Ukdjaj
I know you only want it when someone triggers a trigger. That's why I said, you can switch vision file on the fly.
Look, if you need it spelling out - create 2 vision files: one for black and white and one which is non-black and white. Switch between the 2 as players trigger the triggers:
Code: main()
{
thread powerOn();
thread powerOff();
}
// set Black and White vision file
powerOn()
{
trig = getent( "use_power_switch", "targetname" );
if( isDefined( trig ) )
while( true )
{
trig waittill( "trigger" );
VisionsetNaked( "BWvision" );
}
}
// switch back to default map vision file
powerOff()
{
trig = getent( "unuse_power_switch", "targetname" );
if( isDefined( trig ) )
while( true )
{
trig waittill( "trigger" );
VisionsetNaked( "defaultvision" );
}
}
|
|
|
|
scillman |
|
General Member Since: Nov 23, 2006 Posts: 360 Last: Sep 1, 2012 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Monday, Jan. 16, 2012 06:22 pm |
|
Tally writes...Quote: Or on an individual player only:
Code: VisionSetNight( <nameoffile>, <time to set the file> );
Eh Tally does that work on CoD4 too?! Would be most usefull as I could never find it :D. |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Monday, Jan. 16, 2012 06:31 pm |
|
Lol sorry :P but im from cod2 - only just getting started in codwaw zombie mapping, dont have a clue what a vision file is :(
is it just a file called "bwvision.vision" and "defaultvision.vision, map by a .txt software
then inside it just has set dvar ("sf_use_bw" "1");
or what? sorry never used one before:(
Thanks, Ukdjaj |
|
|
|
Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Monday, Jan. 16, 2012 06:32 pm |
|
scillman writes...Quote: Tally writes...Quote: Or on an individual player only:
Code: VisionSetNight( <nameoffile>, <time to set the file> );
Eh Tally does that work on CoD4 too?! Would be most usefull as I could never find it :D.
That is a stock COD4 function, so I'm surprised you can't find it:
http://openwarfaremod.com/cod4script/effects/visionsetnight.htm
BTW - you can only use VisionSetNight() on a client.
If you want to set it on everyone, you have to use the world function VisionSetNaked(). |
|
|
|
Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Monday, Jan. 16, 2012 06:37 pm |
|
ukdjaj writes...Quote: Lol sorry :P but im from cod2 - only just getting started in codwaw zombie mapping, dont have a clue what a vision file is :(
is it just a file called "bwvision.vision" and "defaultvision.vision, map by a .txt software
then inside it just has set dvar ("sf_use_bw" "1");
or what? sorry never used one before:(
Thanks, Ukdjaj
For the black and white vision file, copy and paste these settings:
Code: r_glow "1"
r_glowRadius0 "9.32874"
r_glowBloomCutoff "0.231778"
r_glowBloomDesaturation "0"
r_glowBloomIntensity0 "1.00002"
r_filmEnable "1"
r_filmContrast "0.87104"
r_filmBrightness "0"
r_filmDesaturation "0.352396"
r_filmInvert "1"
r_filmLightTint "1.10838 1.10717 1.15409"
r_filmDarkTint "0.7 0.928125 1"
Paste it into a new .TXT file, close and save. Then, rename the file extension to .vision. Rename it to whatever you like, for example "bwvision.vision".
Now, for the default map vision, copy and paste these settings:
Code: r_glow "1"
r_glowRadius0 "9.32874"
r_glowBloomCutoff "0.231778"
r_glowBloomDesaturation "0"
r_glowBloomIntensity0 "1.00002"
r_filmEnable "1"
r_filmContrast "0.87104"
r_filmBrightness "0"
r_filmDesaturation "0.352396"
r_filmInvert "0"
r_filmLightTint "1.10838 1.10717 1.15409"
r_filmDarkTint "0.7 0.928125 1"
Do the same as above to create the actual vision file, and name it something like "defaultvision.vision".
When you use the VisionSetNaked(), you quote the name of the appropriate vision file.
The details for how you add it to your map are above, as is the code to use it.
EDIT -
Damn forum doesn't parse paragraph formatting properly.
edited on Jan. 16, 2012 11:40 am by Tally |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoDWW Scripting Posted: Wednesday, Jan. 18, 2012 05:13 pm |
|
Right, ok i set up the trigger in my map, dont work when i go under it would it work if i did scripts setting the dvars of that in the vision file?
BTW my scripts are all being called up and are all stored in /maps and i have recompiled map / built mods
Code: main()
{
thread power ();
}
power()
{
trig=getent("use_power_switch","targetname");
while(1)
{
trig waittill ("trigger");
VisionsetNaked( "defaultvision" );
}
}
Code: main()
{
thread powers ();
}
powers()
{
trigger=getent("start","targetname");
while(1)
{
trigger waittill ("trigger");
VisionsetNaked( "bwvision" );
}
}
default vision
Code: r_glow "1"
r_glowRadius0 "9.32874"
r_glowBloomCutoff "0.231778"
r_glowBloomDesaturation "0"
r_glowBloomIntensity0 "1.00002"
r_filmEnable "1"
r_filmContrast "0.87104"
r_filmBrightness "0"
r_filmDesaturation "0.352396"
r_filmInvert "0"
r_filmLightTint "1.10838 1.10717 1.15409"
r_filmDarkTint "0.7 0.928125 1"
Code: r_glow "1"
r_glowRadius0 "9.32874"
r_glowBloomCutoff "0.231778"
r_glowBloomDesaturation "0"
r_glowBloomIntensity0 "1.00002"
r_filmEnable "1"
r_filmContrast "0.87104"
r_filmBrightness "0"
r_filmDesaturation "0.352396"
r_filmInvert "1"
r_filmLightTint "1.10838 1.10717 1.15409"
r_filmDarkTint "0.7 0.928125 1"
they are all called the right names and are being called up properly, they all have the right extensions, what am i missing?:(
Thanks, Ukdjaj |
|
|
|