Call of Duty 5: Minefields: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
m (New page: Image:Nutshell.png This tutorial will explain how to create/add Minefields to your maps. ==In Radiant== *Choose the Trigger texture, *Drag it where you want a minefield.. *Rightclick...)
 
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:Nutshell.png]] This tutorial will explain how to create/add Minefields to your maps.
{{Note|This tutorial will explain how to create/add Minefields to your maps.}}


=Simple Minefield=
==In Radiant==
==In Radiant==


Line 20: Line 21:


[[Image:minefield_2.png|550px]]
[[Image:minefield_2.png|550px]]


==GSC Scripts==
==GSC Scripts==
Line 26: Line 28:


  maps\mp\_load::main();
  maps\mp\_load::main();


==SoundAlias==
==SoundAlias==


*The two sound used by the stock script are missing from Soundaliases files and even the WAV files are missing, get them here:
*The two sound used by the stock script are missing from Soundaliases files and even the WAV files are missing, get them here:
{{Data}} [http://wiki.modsrepository.com/codww_files/codww_minefields_files.zip DOWNLOAD MISSING MINEFIELD ASSETS]
{{Download|http://wiki.modsrepository.com/codww_files/codww_minefields_files.zip|DOWNLOAD MISSING MINEFIELD ASSETS}}
* In this Archive you will find the Soundalias required, distance and volume can be adjusted before compile to your liking;
* In this Archive you will find the Soundalias required, distance and volume can be adjusted before compile to your liking;
*Simply unpack the archive in your CODWaW Root folder to add the missing assets;
*Simply unpack the archive in your CODWaW Root folder to add the missing assets;


==Zone Source==
==Zone Source==
Line 42: Line 46:


You're done!
You're done!
=Alternate Idea=
This great idea comes from ''HyBr!d'' and it is to replace the actual mine by a Sniper shoot at the player when he walk in the Trigger. Sound are replace:<br>
*Bullets whizzing by instead of the 'click'
*Sniper rifle shot as the explosion sound
<br>
'''The GSC Code for it:'''
<pre>
waterfields()
{
waterfields = getentarray("waterfield", "targetname");
if (waterfields.size > 0)
level._effect["water_explosion"] = loadfx ("impacts/fx_water_hit_tracer_nite.efx");
for(i = 0; i < waterfields.size; i++)
waterfields[i] thread waterfield_think();
}
waterfield_think()
{
for(;;)
{
self waittill ("trigger",other);
if(isPlayer(other))
other thread waterfield_kill(self);
}
}
waterfield_kill(trigger)
{
if(isDefined(self.waterfield))
return;
self.waterfield = true;
self playsound ("shot_flyby");
wait .5;
wait randomFloat(.5);
if(isdefined(self) && self istouching(trigger))
{
origin = self getorigin();
range = 50;
maxdamage = 2000;
mindamage = 50;
self playsound("waterfield_shot");
playfx("water_explosion", origin);
radiusDamage(origin, range, maxdamage, mindamage);
}
self.waterfield = undefined;
}
</pre>
{{Info|This code must be paste into the Stock file /raw/maps/mp/_minefields.gsc (Backup first!) and of course you must add this line to your Zone file:}}
rawfile,maps/mp/_minefields.gsc
*Soundalias to go with the new code:
<pre>
name,sequence,file,platform,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,dist_reverb_max,limit_count,limit_type,entity_limit_count,entity_limit_type,bus,priority,spatialized,type,probability,loop,masterslave,loadspec,reverb_falloff_curve,subtitle,compression,randomize_type,secondaryaliasname,chainaliasname,volumefalloffcurve,startdelay,speakermap,reverb_send,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage,move_type,move_time,occlusion_level,min_priority,max_priority,min_priority_threshold,max_priority_threshold
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
# _waterfield SFX,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
shot_flyby,1,SFX\projectile\bullet\headshot\head\head_00.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,,all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
shot_flyby,2,SFX\projectile\bullet\headshot\head\head_01.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
shot_flyby,3,SFX\projectile\bullet\headshot\head\head_02.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
waterfield_shot,,SFX/Weapon/Rifle/snpr_ring/snpr_mauser/snpr_mauser_02.wav,!wii,1,1,1,1,1,300,1500,,,,,ambience,,,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
</pre>
*Again you must add a line the Zone File to add this soundalias (called waterfields.csv in this example):
sound,waterfields,mp_yourmap,all_mp
'''Thanks to HyBr!d'''
--[[User:Zeroy|Zeroy.]] 10:56, 24 April 2009 (UTC)


[[Category:Call of Duty 5]]
[[Category:Call of Duty 5]]

Latest revision as of 16:28, 23 February 2012

This tutorial will explain how to create/add Minefields to your maps.

Simple Minefield

In Radiant

  • Choose the Trigger texture,
  • Drag it where you want a minefield..
  • Rightclick > Trigger > Multiple



  • Bring up console (press N)

Give it these values:

Key: targetname
Value: minefield



GSC Scripts

Make sure the following is present in your maps/mp/mp_mapname.gsc

maps\mp\_load::main();


SoundAlias

  • The two sound used by the stock script are missing from Soundaliases files and even the WAV files are missing, get them here:

DOWNLOAD MISSING MINEFIELD ASSETS

  • In this Archive you will find the Soundalias required, distance and volume can be adjusted before compile to your liking;
  • Simply unpack the archive in your CODWaW Root folder to add the missing assets;


Zone Source

Add the following to your zone_source/mp_mapname.csv before compiling:

fx,explosions/grenadeExp_dirt
sound,mines,mp_yourmap,all_mp

You're done!


Alternate Idea

This great idea comes from HyBr!d and it is to replace the actual mine by a Sniper shoot at the player when he walk in the Trigger. Sound are replace:

  • Bullets whizzing by instead of the 'click'
  • Sniper rifle shot as the explosion sound


The GSC Code for it:

waterfields()
{
	waterfields = getentarray("waterfield", "targetname");
	if (waterfields.size > 0)
		level._effect["water_explosion"] = loadfx ("impacts/fx_water_hit_tracer_nite.efx");

	for(i = 0; i < waterfields.size; i++)
		waterfields[i] thread waterfield_think();
}

waterfield_think()
{
	for(;;)
	{
		self waittill ("trigger",other);

		if(isPlayer(other))
			other thread waterfield_kill(self);
	}
}

waterfield_kill(trigger)
{
	if(isDefined(self.waterfield))
		return;

	self.waterfield = true;
	self playsound ("shot_flyby");

	wait .5;
	wait randomFloat(.5);

	if(isdefined(self) && self istouching(trigger))
	{
		origin = self getorigin();
		range = 50;
		maxdamage = 2000;
		mindamage = 50;

		self playsound("waterfield_shot");
		playfx("water_explosion", origin);
		radiusDamage(origin, range, maxdamage, mindamage);
	}

	self.waterfield = undefined;
}
This code must be paste into the Stock file /raw/maps/mp/_minefields.gsc (Backup first!) and of course you must add this line to your Zone file:
rawfile,maps/mp/_minefields.gsc
  • Soundalias to go with the new code:
name,sequence,file,platform,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,dist_reverb_max,limit_count,limit_type,entity_limit_count,entity_limit_type,bus,priority,spatialized,type,probability,loop,masterslave,loadspec,reverb_falloff_curve,subtitle,compression,randomize_type,secondaryaliasname,chainaliasname,volumefalloffcurve,startdelay,speakermap,reverb_send,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage,move_type,move_time,occlusion_level,min_priority,max_priority,min_priority_threshold,max_priority_threshold
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
# _waterfield SFX,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
shot_flyby,1,SFX\projectile\bullet\headshot\head\head_00.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,,all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
shot_flyby,2,SFX\projectile\bullet\headshot\head\head_01.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
shot_flyby,3,SFX\projectile\bullet\headshot\head\head_02.wav,!wii,1,1,1,1,1,175,1500,,,,,ambience,,3d,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
waterfield_shot,,SFX/Weapon/Rifle/snpr_ring/snpr_mauser/snpr_mauser_02.wav,!wii,1,1,1,1,1,300,1500,,,,,ambience,,,,,,, all_mp,curve3,,,,,,curve3,,,0.7,,,,,,,,,0.4,20,60,0.25,1
  • Again you must add a line the Zone File to add this soundalias (called waterfields.csv in this example):
sound,waterfields,mp_yourmap,all_mp


Thanks to HyBr!d

--Zeroy. 10:56, 24 April 2009 (UTC)