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

Members Online

»
0 Active | 43 Guests
Online:

LATEST FORUM THREADS

»
coduo mapping tools
CoDUO Mapping
Gaming
Q4 General
eXtreme+ v2.9
CoDBO Map + Mod Releases
map loading error
CoD2 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 Topic is Locked
Page
Next Page
subscribe
Author Topic: Weapon as big red square
Zaphax
General Member
Since: Jun 17, 2008
Posts: 251
Last: Dec 29, 2013
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Tuesday, Jul. 10, 2012 11:43 am
i need help with few basic things.


1. Weapon is a big red square?
I can't see my weapon nor the things that are in front of me.

2. Nightvision has no sound and no animation?
When i press N to put on nightvision i don't hear the NVG sound effect and i dont see the hands animation.

3. Friendlies with invisible weapons?
My allies spawn with invisible weapons all i can see is reflex attachment and the green laser when NVG is on.

4. No secondary weapon?
Script doesn't give me the silenced beretta pistol on spawn?


Here is my .gsc file:

Code:
#include maps\_utility; #include maps\_vehicle; #include maps\_helicopter_globals; #include common_scripts\utility; #include maps\_anim; #include maps\_utility_code; #include maps\_vehicle_aianim;  		main() 		{ 		maps\_load::main(); 		maps\_nightvision::main();  	//weapon clips  		level.weaponClipModels = []; 		level.weaponClipModels[1] = "weapon_m4m203_clip";  	//give player weapons  		level.player takeallweapons(); 		level.player giveWeapon( "Beretta" ); 		level.player giveWeapon( "m4_grunt" ); 		level.player switchToWeapon( "m4_grunt" ); 		level.player giveWeapon( "fraggrenade" ); 		level.player giveWeapon( "flash_grenade" ); 		level.player setOffhandSecondaryClass( "flash" ); 		level.player setViewmodel( "viewmodel_base_viewhands" ); 		level.campaign = "american";  	//precache models  		precachemodel( "m4m203_silencer_reflex" );  	//introscreen  		precacheString(&"mapname_INTROSCREEN_INTRO"); 		precacheString(&"mapname_INTROSCREEN_DATE"); 		precacheString(&"mapname_INTROSCREEN_PLACE"); 		precacheString(&"mapname_INTROSCREEN_INFO");  		thread introscreen();   		} 		introscreen() 		{   		//thread maps\_introscreen::introscreen_generic_white_fade_in( 2 ); // White fade in  		lines = []; // Create An Array Of Strings 		lines[ lines.size ] = &"mapname_INTROSCREEN_INTRO"; 		lines[ "date" ] = &"mapname_INTROSCREEN_DATE"; 		lines[ lines.size ] = &"mapname_INTROSCREEN_PLACE"; 		lines[ lines.size ] = &"mapname_INTROSCREEN_INFO";  		maps\_introscreen::introscreen_feed_lines( lines ); // Output Strings As Hud Elements 		wait 1; 		saveGame( "levelstart", &"AUTOSAVE_LEVELSTART", "whatever", true );  		wait(10 ); 		level notify("introscreen_complete"); // Notify level the intro screen is done   		}


Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Tuesday, Jul. 10, 2012 12:38 pm
1.Try updating the zone file. Start the map, close it, update the zone file, save the fastfile. Then do it again until it doesnt find any new assets.
4.There is a bug of certain weapon material file going missing(m4m203_silencer_reflex). You need to extract that file again from the mod tools zip file.

edited on Jul. 10, 2012 12:57 pm by 3st0nian

edited on Jul. 10, 2012 12:57 pm by 3st0nian

edited on Jul. 11, 2012 12:04 am by 3st0nian
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 530
Last: Oct 17, 2018
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Thursday, Jul. 12, 2012 04:59 am
Remember when updating the zone file and copying the missiong assets etc u need to rebuild the fast file in order to take the csv in the fast file. The missing weapon should apear in the missing assets. about the NVG i have no idea[biggrin][casanova]
Share |
Zaphax
General Member
Since: Jun 17, 2008
Posts: 251
Last: Dec 29, 2013
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Thursday, Jul. 12, 2012 05:39 am
Yeah i fixed the red square and invisible weapons it helped extracting files from mod tools v1.zip NVG is still a problem it shows all perfectly the animation but when i press N he puts on the mask but it doesnt show the black screen before you get the nightvision view on screen... thats the only thing otherwise NVG works fine.

Secondary weapon i have no idea i cant spawn any secondary weapon almost not usp_silencer nor beretta i need a silenced pistol as secondary but it wont let me... I also tried m4m203_silencer_reflex as secondary and m14_scoped_silencer_woodland as primary. i get the silenced m14 but i do not get m4m203_s...


I got one new problem its when i load map i get error main {} when i check console log it shows error cant find xmodel weapon [weapon name here] the funny part is that i do have that model i did use script for the weapon in .gsc and i used it in zone file...



Anyone who have time to take a look, thanks! [thumbs_up]

Put the files from the folders to the raw directories as this is not a packed map.iwd file.

download map files here.
Share |
TexasRebel
General Member
Since: Apr 30, 2006
Posts: 373
Last: Aug 19, 2013
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Thursday, Jul. 12, 2012 03:49 pm
What about this function?

http://wiki.modsrepository.com/index.php/Call_of_Duty_4:_Scripting_Reference_-_Player::SetWeaponSlotWeapon

just looking at the code you did post

you call
Code:
level.player giveWeapon( "Beretta" );


and then very next line call
Code:
level.player giveWeapon( "m4_grunt" );


my line of thinking is that you gave yourself a beretta in the primary slot, then just gave yourself a m4 in the primary slot, taking away the beretta.

with setweaponslotweapon you specify whether a weapon goes in the primary or secondary slot. That link explains it pretty well. Good Luck

I could be entirely wrong as has been a while since I even touched the cod4 tools.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 SP Mapping
Posted: Thursday, Jul. 12, 2012 11:54 pm
TexasRebel writes...
Quote:
What about this function?

http://wiki.modsrepository.com/index.php/Call_of_Duty_4:_Scripting_Reference_-_Player::SetWeaponSlotWeapon

just looking at the code you did post

you call
Code:
level.player giveWeapon( "Beretta" );


and then very next line call
Code:
level.player giveWeapon( "m4_grunt" );


my line of thinking is that you gave yourself a beretta in the primary slot, then just gave yourself a m4 in the primary slot, taking away the beretta.

with setweaponslotweapon you specify whether a weapon goes in the primary or secondary slot. That link explains it pretty well. Good Luck

I could be entirely wrong as has been a while since I even touched the cod4 tools.


The Wiki you linked to is in error. setweaponslotweapon( weapon_slot, weapon ) is a COD2 function. It is not used in COD4.

You can tell it's a COD2 function because it says that you have to state which slot the weapon goes in - either "primary" or "primaryb". COD4 does not have weapon slots.

Share |
TexasRebel
General Member
Since: Apr 30, 2006
Posts: 373
Last: Aug 19, 2013
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Friday, Jul. 13, 2012 10:09 am
Good to know . . . wish I could find the one wiki that zeroy listed all the cod4 functions on but searched on lunch break yesterday and when I got home after work and could not find. Thats where I would go for cod4 functions and was able to do what Zaphax is asking for.

Sadly I never backed up those sp maps I was making and no longer have the gsc with the coding. Otherwise I would just paste the code here that worked.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 SP Mapping
Posted: Friday, Jul. 13, 2012 10:22 am
TexasRebel writes...
Quote:
Good to know . . . wish I could find the one wiki that zeroy listed all the cod4 functions on but searched on lunch break yesterday and when I got home after work and could not find. Thats where I would go for cod4 functions and was able to do what Zaphax is asking for.

Sadly I never backed up those sp maps I was making and no longer have the gsc with the coding. Otherwise I would just paste the code here that worked.


It isn't zeroy's list of functions, like everyone erroneously call it. Like a lot of other people, he simply saved the original one that Infinity Ward created, before they took it down. There are 3 or 4 sites that host it. Here is one such that is always up and available:

http://openwarfaremod.com/cod4script/

I wish people would start crediting the "real" creators of the script function library - Infinity Ward.
Share |
{GITS}TheCleaner
General Member
Since: Apr 8, 2012
Posts: 58
Last: Oct 4, 2013
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Friday, Jul. 13, 2012 10:37 am
This is Zeroys wiki, now called Mapper United Wiki.

Dont't know if it helps you [wink]

http://wiki.modsrepository.com/index.php/Main_Page
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 SP Mapping
Posted: Friday, Jul. 13, 2012 10:44 am
{GITS}TheCleaner writes...
Quote:
This is Zeroys wiki, now called Mapper United Wiki.

Dont't know if it helps you [wink]

http://wiki.modsrepository.com/index.php/Main_Page


Unfortunately, it doesn't help, because if you had bothered to read the thread you would see it's the wiki linked to a couple of posts up with the erroneous info in it. Which prompted me to point out that it is wrong.
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»