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

Members Online

»
0 Active | 74 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 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 subscribe
Author Topic: Objective Kill enemies. How to?
SPi
General Member
Since: Jul 4, 2012
Posts: 531
Last: Nov 9, 2019
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Saturday, Feb. 2, 2013 04:41 pm
Im going so good with my maps![biggrin]
So i have a few questions (easy ones)[drink]
So...

I have 7 enemies.
i want to have an objective to kill em.
Once they are dead I want the Objective to be Compleated.
Anyone can tell me how to do this?[wave]
Share |
Spik3d
General Member
Since: Jan 30, 2008
Posts: 130
Last: Feb 19, 2015
[view latest posts]
Level 4
Category: CoD4 SP Mapping
Posted: Saturday, Feb. 2, 2013 10:53 pm
Look at obj2()

http://modsonline.com/Tutorials-read-198.html
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Sunday, Feb. 3, 2013 01:26 am
Try this see if this works.

Code:

guys_die_obj
{	
	guys = getentarray(  (name), "targetname" );
	for( i = 0; i < guys.size; i++)
	{
		objective_add( (objective number), "active", (objective string from string file ) )
		objective_position( (objective number), guys[i].origin );
		guys[i] waittill( "death" );
		objective_state( (objective number ), "done" );
	}
}



make sure that all your ai's have the same name and that they are alive at the time that you call this thread. Fill in the obj # with w/e your objective number is that you want it to be.

edited on Feb. 2, 2013 06:32 pm by voidsource


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: Sunday, Feb. 3, 2013 08:46 am
Code:
dudes1 = get_living_ai_array("harbor_guys", "script_noteworthy");
waittill_dead(dudes1);
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 531
Last: Nov 9, 2019
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Sunday, Feb. 3, 2013 11:29 am
attachment: image(198.8Kb)
Thank you guys for your response .[thumbs_up]
It worked fine as i used this mix of 3st0nian and Voidsource
Code:
	objective_add( 1, "active", &"Prologue_OBJ_1" ); 	objective_current(1); 	enemies = getentarray("starting_force", "targetname"); 	waittill_dead(enemies); 	objective_state( 1, "done" );


So thanks again.[thumbs_up][wave]
A question for Void.
Ive used the city sourcefiles to learn aboyt soundalias and voiseovers.
Vouseovers worked fine for me (made custom ones)
But i cant use custom music with this line:

introscreen,,city/introscreen1.mp3,music,1,1,1,1,,,music,streamed,,looping,,,,,,,,,,,,,,,

u used this ^^^ above.

I based on this and made this

training,,intro/music/intro.mp3,music,1,1,1,1,,,music,streamed,,looping,,,,,,,,,,,,,,,

It does not work the error in console is in the pic i uploaded .
any ideas mayte?[confused]
Share |
FzBr.d4rk
General Member
Since: Jan 23, 2011
Posts: 86
Last: Jun 7, 2016
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Sunday, Feb. 3, 2013 01:41 pm
try this:

training,,intro/music/intro.mp3,,0.5,,music,,,,,music,streamed,,,,,,,,,,music,nowetlevel fulldrylevel,,,!PC
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 531
Last: Nov 9, 2019
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Sunday, Feb. 3, 2013 02:21 pm
Does not work like that i saw u had some missplaced things out there
I tried do this[read]

training,,intro/music/intro.wav,1,1,1,,,,,music,loaded,1,looping,,,,,,,,,nowetlevel fulldrylevel,,,,,,!PC

What else can i try .[confused]
Its hard to do.
Music was always hard to doin cod 4.[cry]
I never have a good soundalias line that works fine for music[cry]

Can anyone help a abit more [thumbs_up]
[wave]
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Sunday, Feb. 3, 2013 08:57 pm
First of I want to tell you that this is not an easy topic to cover and most likely you will not get it right the first time around so with that in mind
this is going to be a lenghty explanation of how sounds work in cod4. So I hope u read through it all and watch the video as i took the time to
actually write this out and make a video to explain to you how sounds work. So just to give u a brief description of how this is going to go down
is like this:

1. Going through soundaliases and explaining how that works
- Explaining the meaning of name, sequence, ...and their importance

2. Including your soundaliases in your zone file
- How to properly add the sounds and soundaliases to your zone file

3. File handling
- Packing your custom sounds into a zip
- Where to properly place your zip file for others who will play your map


Lets get started then!
1. Soundaliases runthrough

What is most important is that you match things correctly to their proper spots.
What I mean by this is that on the top of the the audio file you have things like

Code:

,name,name of the alias that is used to play this sound (required)
,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)"
,file,the name of the file that contains the sound data (required)
,vol_min,"0 is silent, 1 is full volume (default = 1)"
,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)"
,vol_mod,"blank causes no effect on vol_min and vol_max, otherwise the string must match a string in the volumemodgroups.def file and the value in that file corresponding to that string will be used to adjust vol_min and vol_max, clamped to the valid range"
,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)"
,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)"
,dist_min,"within this distance in inches, the sound is always full volume (default = 120)"
,dist_max,"outside this distance in inches, the sound is not started.  If left blank or set to 0, the sound will play from any distance.  This does not affect sound volume falloff."
,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)"
,type,primed (a streamed sound which gets primed on some platforms) / streamed / loaded (default = loaded)
,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1)
,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")"
,masterslave,"if ""master"", this is a master sound.  If a number, then this sound's volume will be multiplied by that number (a percentage between 0 and 1) any master sound is playing.  If blank, then neither master nor slave."
,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"".  If blank, the alias is used on all maps."
,compression,"a string corresponding to an entry in ""XMAUpdate.tbl"" which is used to determine compression by XMAUpdate.exe"
,secondaryaliasname,"defined the name of an additional sound alias to play in addition to the current alias being played. Note that it is an error for the secondaryalias to also define a secondaryaliasname (eg, if B is a secondaryalias of A, B is not allowed to have its own secondaryalias)."
,volumefalloffcurve,if blank uses the linear curve which can not be changed. A string 'XXXX' corresponds to the curve defined by the file 'soundaliases/XXXX.vfcurve'
,startdelay,defaults to no delay. The value is the number of milliseconds to delay starting the sound by
,speakermap,if blank uses the default speakermappings which cannot be changed. A string 'XXXX' corresponds to the speakermap defined by the file 'soundaliases/XXXX.spkrmap'. 
,reverb,"blank means the alias is affected normally by wet and dry levels, ""fulldrylevel"" forces the alias to use a full drylevel (ignoring the global drylevel), ""nowetlevel"" forces the alias to use no wetlevel (ignoring the global wetlevel)"
,lfe percentage,this determines what percentage of the highest calculated spatialized speaker volume should be passed to the LFE. blank means no LFE for the sound
,center percentage,this determines what percentage of the volume should be redirected to the center channel (equal percentage taken from all speakers).
,platform,"used by XMAUpdate to determine whether the alias should be processed for a particular platform.  If blank, process for all platforms.  Platforms are PC, XB, PS, WI.  Multiple values should be separated by spaces.  !PC will exclude alias from PC but include in all other platforms.  PC will only include alias for PC.  !PC XB is invalid."
,envelop_min,any sounds within this distance of the listener will use the full envelop percentage,,,,,,,,,,,,,,,,,,,,,,,,,
,envelop_max,sounds between enevlop_min and envelop_max use a fraction of the envelop percentage,,,,,,,,,,,,,,,,,,,,,,,,,
,envelop percentage,amount of omnidirectionality to apply,,,,,,,,,,,,,,,,,,,,,,,,,



These explain exactly what they do and give u a good direction as to which ones to use. While I personally don't use them all, I do use the mandatory ones. Now you have the option of using or not using them. But either way you have a good description of what you want to actually use. So some things are important than others and must be included, example "name","file", "Vol_min", "vol_max"...etc.... Others might be not included. Each one needs to be seperated by a comma. Example: name,file,vol_min,vol_max....

Ive made a video to kinda explain much better ( hopefully )






2. Zone File
For custom sounds you have to include it the soundaliases and/ or the sound(s).
So for the map city i used this in the zone file:

Code:

sound,city,city,all_sp
rawfile,sound/city/filename.wav



The first line is the actual sound aliases file for my map. "sound" in this case refers to the soundalises folder.
Then the 2nd part refers to my filename "city". This tells it to use the soundaliases called "city" inside the soundaliases folder.
The 3rd part refers to the map on which to use it on, in this case the map "city".
The last part is whether or not it can be used on all the sp's or not. I put used on all sounds hence why it is "all_sp" and not "!all_sp"
That's how that worked for me.

The 2nd line refers to the actual sound file itself. It was included in the zone file bc it is a cutom sound.
keep in mind that it is a ".wav" file not a ".mp3" bc theres issues i couldnt resolve with mp3 so i just ended up using .wav.
So in this case i "sound" ( after rawfile,) is the actual sound folder found in raw.
then in there i created a folder inside "sound" and called it "city".
Within this folder i have all my sound files.


3. File Handling
Finally when you want distribute your map with custom sounds, you have to make a zip file for it.
Inside the zip file you have a "sound" folder with a "sub folder" ( if u created one ) and then all your sound files inside that sub folder.
Everything must be the same exact path as you had it in ur raw/sound folder. Otherwise your sounds wont play and/or you will have errors.
Once you have that zip file you MUST then go into the "Mods" folder and create a new folder with your map's name. The reason why is
bc you now have custom sounds that are not originally in the game so therefore they are considered modded files hence they must go
in the "Mods" folder with your maps name folder. so it should look something like this :


cod4>Mods>Mapname>zip file



The last part is to run the sp shortcut with your mod.
Simply right click on your cod4 sp shortcut on ur desktop and go down to properties.
Then the shortcut tab and in the section "target" go to the end and put a space and add this to it "+set fs_game mods/modname" (without quotes).
so it should look like this:

Code:

"C:\Program Files (x86)\Activision\Call of Duty 4 - Modern Warfare\iw3sp.exe" +set fs_game mods/modname


modsname is the name of the folder you created inside the "Mods" folder.
and thats how you do sounds in cod4. Hopefully this will help you in understanding sounds.


Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 531
Last: Nov 9, 2019
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Tuesday, Feb. 5, 2013 10:14 pm
God Bless you voidsource
I Really Apretiate so much the fact that you spent so much time to explain all these to me and others who may have the same problem.
I am very greaful of you.[thumbs_up]

I will study, prosess, save and Learn to use: All that ,and then ill inform you for any results.

I also have to inform ALL members that many errors (not all)
I had were caused from the wrong COD4MODtools installation of mine and the late Run compiler.[duh]

I Will reinstall EVERYTHING conserning COD4 (of course saving all the work,maps, etc) and then ill be ready for more action as i see no other questions ahead but soundaliases.
Thank all of you [thumbs_up]

[exclamation]P.S.
My Mappack is in very good progress.
If any of you wanna learn some things about it, e-mail me and trust me, you will LOVE what ill show out in the summer.

edited on Feb. 6, 2013 05:51 am by SPi
Share |
Restricted Access Topic is Locked 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

»