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

Members Online

»
0 Active | 65 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP 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 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Find a Weapon
greaperc4
General Member
Since: Apr 20, 2012
Posts: 17
Last: Dec 9, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Monday, Apr. 30, 2012 05:19 pm
ive got a request for a tutorial
- can someone make a tutorial where u can find in a game weapons like the light thing in the jump turorial but instead of the jump a weapon
sorry for the bad english i hope everyone understands it! :D
Share |
FzBr.d4rk
General Member
Since: Jan 23, 2011
Posts: 86
Last: Jun 7, 2016
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Saturday, May. 5, 2012 06:50 am
Sorry but I don't understand your question, could you explain a little more what you want ?[thumbs_up]
Share |
greaperc4
General Member
Since: Apr 20, 2012
Posts: 17
Last: Dec 9, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Saturday, May. 5, 2012 01:25 pm
if u have a map a sort of maze
then u can find somewhere a weapon on the ground
and u can pick it up
i hope u understand it now ! :D
Share |
FzBr.d4rk
General Member
Since: Jan 23, 2011
Posts: 86
Last: Jun 7, 2016
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Sunday, May. 6, 2012 09:43 pm
like in Oldschool game mode?
Share |
greaperc4
General Member
Since: Apr 20, 2012
Posts: 17
Last: Dec 9, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Sunday, May. 6, 2012 10:42 pm
okay i wil explain:
ive made a map
with a sort of maze
of one of the sides is a spawn
and other side to
if someone spawns he has choose a slot
-[and if he goes into the maze he can find a weapon that he can pick up its like a trade.]
-[if u kill someone his weapon is on the ground u can pick it up]
thats like the same
do u understand it now :D[wink]
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Monday, May. 7, 2012 08:34 am
Are u sure its for MP? Than just place the weapon on the ground. If u want to make it glow like in SP u need to also make a little script for the glowing
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD4 MP Mapping
Posted: Monday, May. 7, 2012 09:22 am
You can do it in Radiant, by placing a weapon at a particular spot, and putting all the right KVPs in, but the weapon wont have much ammo and you will only be able to pick it up once.

However, if you do it by script, you can easily place as many weapons as you want. Here is a script which will place an M1014 at an origin of your choosing, it will have full ammo, and will respawn once picked up:

Code:
init()
{
	level.respawnTime = 20;
	
	spawn_weapon( "weapon_m1014_mp", "weapon_pickup", ( 5353, -1565, 0 ), ( 0,0,0 ) );
	
	thread test();
}

spawn_weapon( classname, targetname, origin, angles )
{
	if( !isdefined( classname ) || !isdefined( targetname ) || !isdefined( origin ) )
		return undefined;
	
	if(!isdefined( angles ) ) 	
		angles = (0,0,0);

	flags = 4;
	height = (0,0,5);
	
	weapon            = spawn( classname, origin+height, flags );
	weapon.targetname = targetname;
	weapon.angles     = angles;
	
	return weapon;
}

test()
{
	pickups = getentarray( "weapon_pickup", "targetname" );
	
	for( i = 0; i < pickups.size; i++ )
	{
		thread trackPickup( pickups[i] );
		wait 0.02;
	}
}

trackPickup( pickup )
{
	classname = pickup.classname;
	origin = pickup.origin;
	angles = pickup.angles;
	spawnflags = pickup.spawnflags;
	
	isWeapon = false;
	weapname = undefined;
	respawnTime = undefined;

	if( issubstr( classname, "weapon_" ) )
	{
		isWeapon = true;
		weapname = pickup maps\mp\gametypes\_weapons::getItemWeaponName();
		respawnTime = level.respawnTime;
	}
	
	while( true )
	{
		player = undefined;
		
		if( isWeapon )
		{
			pickup setPickupStartAmmo( weapname );
			
			while( true )
			{
				pickup waittill( "trigger", player, dropped );
				
				if( !isdefined( pickup ) )
					break;
				
				assert( !isdefined( dropped ) );
			}
			
			if( isdefined( dropped ) )
			{
				dropDeleteTime = 5;
				if( dropDeleteTime > respawnTime )
					dropDeleteTime = respawnTime;
				dropped thread delayedDeletion( dropDeleteTime );
			}
		}
		
		wait respawnTime;
		
		pickup = spawn( classname, origin, spawnflags );
		pickup.angles = angles;
	}
}

setPickupStartAmmo( weapname )
{
	curweapname = weapname;
	altindex = 0;
		
	while( altindex == 0 || (curweapname != weapname && curweapname != "none") )
	{
		allammo = weaponStartAmmo( curweapname );
		clipammo = weaponClipSize( curweapname );
		
		reserveammo = 0;
		
		if( clipammo >= allammo )
		{
			clipammo = allammo;
		}
		else
		{
			reserveammo = allammo - clipammo;
		}
		
		self itemWeaponSetAmmo( clipammo, reserveammo, altindex );
		curweapname = weaponAltWeaponName( curweapname );
		altindex++;
	}
}

deleteOnDeath( ent )
{
	ent endon("death");
	self waittill("death");
	ent delete();
}

delayedDeletion( delay )
{
	self thread delayedDeletionOnSwappedWeapons( delay );
	
	wait delay;
	
	if( isDefined( self ) )
	{
		self notify("death");
		self delete();
	}
}

delayedDeletionOnSwappedWeapons( delay )
{
	self endon("death");
	while( true )
	{
		self waittill( "trigger", player, dropped );
		
		if( isdefined( dropped ) )
			break;
	}
	
	dropped thread delayedDeletion( delay );
}


You will have to replace the origin I put in with one of your own.

Thread this script from your level GSC file.

For other weapons just put the full name of the weapon in other spawn_weapon() functions. Example:

Code:
init()
{
	level.respawnTime = 20;
	
	spawn_weapon( "weapon_m1014_mp", "weapon_pickup", ( origin ), ( 0,0,0 ) );
	spawn_weapon( "weapon_m4_mp", "weapon_pickup", ( origin ), ( 0,0,0 ) );
	spawn_weapon( "weapon_mp5_mp", "weapon_pickup", ( origin ), ( 0,0,0 ) );
	
	thread test();
}
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP 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

»