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

Members Online

»
0 Active | 59 Guests
Online:

LATEST FORUM THREADS

»
Light grid issue
CoD4 MP Mapping

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 4
Category: CoD4 SP Mapping
CoD 4 mapping and level design for single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Cargoship facemask animation (Dvar does not exist)
ViktorMor
General Member
Since: Apr 8, 2016
Posts: 16
Last: Nov 26, 2018
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Monday, Nov. 26, 2018 09:17 am
Error pops up when i start the map.
It says "SetSavedDvar(): The dvar "nightVisionPowerOnTime" does not exist."

Here is code:

Code:
#include maps\_utility;

#include common_scripts\utility;

#include maps\_utility_code;

#include maps\_anim;

#include maps\mo_tools;

#include maps\_vehicle_aianim;

#include maps\_hud_util;

#include maps\jake_tools;


#using_animtree( "generic_human" );



main()
{
	maps\_load::main();
	maps\_nightvision::main();
	
	precacheItem("gasmask");
	precachemodel("viewmodel_scuba_mask");
	
	
	level.player takeallweapons(); 
	level.player giveWeapon( "m4_silencer" ); 
	level.player givemaxammo( "m4_silencer" ); 
	level.player giveWeapon( "beretta" ); 
	level.player givemaxammo( "beretta" ); 
	level.player setviewmodel( "viewhands_sas_woodland" ); 
	level.player switchtoweapon( "m4_silencer" ); 
	thread PlayerMaskPuton();
}
PlayerMaskPuton()
{
	orig_nightVisionFadeInOutTime = GetDvar( "nightVisionFadeInOutTime" );
	orig_nightVisionPowerOnTime = GetDvar( "nightVisionPowerOnTime" );
	SetSavedDvar( "nightVisionPowerOnTime", 0.5 );
	SetSavedDvar( "nightVisionFadeInOutTime", 0.5 );
	SetSavedDvar( "overrideNVGModelWithKnife", 1 );
	SetSavedDvar( "nightVisionDisableEffects", 1 );

	wait( 0.01 ); //give the knife override a frame to catch up
	level.player ForceViewmodelAnimation( "gasmask", "nvg_down" );
	wait( 2.0 );
	SetSavedDvar( "hud_gasMaskOverlay", 1 );
	wait( 2.5 );

	SetSavedDvar( "nightVisionDisableEffects", 0 );
	SetSavedDvar( "overrideNVGModelWithKnife", 0 );
	SetSavedDvar( "nightVisionPowerOnTime", orig_nightVisionPowerOnTime );
	SetSavedDvar( "nightVisionFadeInOutTime", orig_nightVisionFadeInOutTime );
}

And here is my zone file:
Code:
ignore,code_post_gfx
ignore,common
col_map_sp,maps/test.d3dbsp
rawfile,maps/_anim.gsc
rawfile,maps/_nightvision.gsc
rawfile,maps/test.gsc
rawfile,maps/jake_tools.gsc
rawfile,maps/mo_tools.gsc
localize,test
sound,common,test,!all_sp
sound,test,test,all_sp
sound,generic,test,!all_sp
sound,voiceovers,atmo1,!all_sp
sound,requests,test,!all_sp
xmodel,viewhands_sas_woodland
weapon,sp/ak74u
weapon,sp/beretta
weapon,sp/mp5
localize,test
sound,ru_battlechatter,sp_sp_spot1_1e,all_sp
sound,uk_battlechatter,sp_sp_spott_1e,all_sp
sound,ab_battlechatter,sp_sp_fight_1e,all_sp
sound,us_battlechatter,sp_sp_fight_1e,all_sp
weapon,sp/ak47_grenadier
weapon,sp/gp25
weapon,sp/m4_silencer
weapon,sp/beretta
xmodel,viewmodel_scuba_mask
weapon,sp/gasmask
material,gasmask_overlay
rawfile,shock/nightvision.shock

xmodel,viewmodel_nvg
material,hud_icon_nvg
material,nightvision_overlay_goggles

Share |
JerryALT
General Member
Since: Oct 5, 2018
Posts: 5
Last: Nov 27, 2018
[view latest posts]
Level 0
Category: CoD4 SP Mapping
Posted: Tuesday, Nov. 27, 2018 07:03 am
Hmm, as strange as it may seem, everything works without errors.
Just in case, I created a module (Google Disk)
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 SP Mapping

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

»