Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 66 Guests
Online:

LATEST FORUM THREADS

»
New BF2 Mod
BF2 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty: World at War
Category: CoDWW Scripting
Scripting and coding with Call of Duty: World at War.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: src_use_bw not working?
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDWW Scripting
Posted: Saturday, Jan. 14, 2012 07:45 pm
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[thumbs_up]
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDWW Scripting
Posted: Sunday, Jan. 15, 2012 05:10 am
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[thumbs_up]
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoDWW Scripting
Posted: Monday, Jan. 16, 2012 05:14 am
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
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDWW Scripting
Posted: Monday, Jan. 16, 2012 09:53 am
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[thumbs_up]
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoDWW Scripting
Posted: Monday, Jan. 16, 2012 10:49 am
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[thumbs_up]


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" );
		} 
}
Share |
scillman
General Member
Since: Nov 23, 2006
Posts: 360
Last: Sep 1, 2012
[view latest posts]
Level 5
Category: CoDWW Scripting
Posted: Monday, Jan. 16, 2012 11:22 am
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.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDWW Scripting
Posted: Monday, Jan. 16, 2012 11:31 am
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[thumbs_up]
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoDWW Scripting
Posted: Monday, Jan. 16, 2012 11:32 am
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().
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoDWW Scripting
Posted: Monday, Jan. 16, 2012 11:37 am
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[thumbs_up]


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
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoDWW Scripting
Posted: Wednesday, Jan. 18, 2012 10:13 am
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[thumbs_up]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»