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

Members Online

»
1 Active | 10 Guests
Online:

LATEST FORUM THREADS

»
water
CoD4 MP Mapping
Rainbow HELP....
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 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Find a Weapon
greaperc4
General Member
Since: Apr 19, 2012
Posts: 17
Last: Dec 8, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Monday, Apr. 30, 2012 10:19 am
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.Dark
General Member
Since: Jan 23, 2011
Posts: 77
Last: May 22, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Friday, May. 4, 2012 11:50 pm
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 19, 2012
Posts: 17
Last: Dec 8, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Saturday, May. 5, 2012 06:25 am
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.Dark
General Member
Since: Jan 23, 2011
Posts: 77
Last: May 22, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Sunday, May. 6, 2012 02:43 pm
like in Oldschool game mode?
Share |
greaperc4
General Member
Since: Apr 19, 2012
Posts: 17
Last: Dec 8, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Sunday, May. 6, 2012 03: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: 189
Last: May 18, 2013
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Monday, May. 7, 2012 01: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 02: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 Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

Latest Syndicated News

»
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.
Loadout
Gun Crafting to the Max. edited on Sep. 25, 2012 06:57 pm by Morp...
Introducing the Source Fil...
Surprised this wasn't made a long time ago. Sounds like a nice little feature.
Introducing the Source Fil...
The Source Filmmaker (SFM) is the movie-making tool built and used by us he...

Partners & Friends

»