Art of War Central
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
The next MODSonair show will air LIVE on:
03/21/2010 12:03 EDT

Time remaining:
We Dontated to PixelEquity
"Mod or modification is a term generally applied to PC games, especially first-person shooters, RPGs and real-time strategy games." 2
 
Site News   |   Aggregated News   |   Forums   |   Tutorials   |   Downloads   |   Projects   |   Weblinks
Latest Forum Threads 
CoD2 SP Mapping.. Posts: (8) Views: (91) by IvanFilip
CoDWW Map + Mod .. Posts: (18) Views: (215) by Rasta
CoD4 Map + Mod R.. Posts: (14) Views: (179) by Rasta
CoD4 General.. Posts: (4) Views: (56) by Rasta
CoDWW SP Mapping.. Posts: (10) Views: (439) by dundy
CoD4 SP Mapping.. Posts: (2) Views: (71) by sam_fisher3000
CoD4 SP Mapping.. Posts: (6) Views: (84) by voidsource
CoD4 Scripting.. Posts: (13) Views: (92) by Larrabee
CoD4 MP Mapping.. Posts: (2) Views: (25) by {UST}Hogan
CoD4 Scripting.. Posts: (1) Views: (23) by Samuel033
Back to Home Page
MODSCON 2010 L4D2 Contest
Art of War Central
Register/Login to Add a Tutorial
Tutorials
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Creating Objectives
Versions: You must be logged in to view history.

How to add objectives in your SP map by [FR]Sparks
Updated 02/27/2005

Updated 02/27/2005


STRING


First you need a string so the objectives will be
shown when a player presses [TAB].
This information is stored in a string and put into the following directory:
"Call of Duty\(main or uo)\localizedstrings\english"

*****STRING FILE SHOULD BE CALLED BE: MAPNAME.STR*****

That is what a typical string will look like:


CODE


VERSION             "1"

CONFIG              "F:\projects\mk\bin\StringEd\StringEd.cfg"

FILENOTES           ""



REFERENCE           OBJ1

LANG_ENGLISH        "Get to located position."



REFERENCE           OBJ2

LANG_ENGLISH        "Kill the German officer"



REFERENCE           OBJ3

LANG_ENGLISH        "Blow up the seawall."



REFERENCE           OBJ_COMPLETED

LANG_ENGLISH        "All Objective Completed!"



REFERENCE           OBJECTIVES

LANG_ENGLISH        "Press the |Tab| key to check your Objectives"



ENDMARKER


*REFERENCE is basically the variable name that will be
used in the .GSC to call up the information stored in
the variable to be displayed.

**LANG_ENGLISH is the text that is stored in the Reference variable.


MAP DESIGN


You can usually just make trigger brushes and assign it
a targetname and place it somewhere. Or you can assign
many other things such as AI or models. The .GSC will
be self explanitory.

In the following .GSC example, I am giving a trigger_multiple the value of
"targetname","obj1"
And a German AI the value of
"targetname","obj2"
And a trigger_use the value of
"targetname","obj3"


CODE


***Optional****
If you want FX for the seawall explosion (Objective 3), Complete the
following:

Make the destroyed wall

Make the before-wall, select the before_wall piece and right click to make
it a script_brushmodel

Give the before-wall the value of "script_exploder","1"

Give the trigger_use the value of "script_exploder","1"

Make a script_model and give it the values
"model","model/fx"
"script_exploder","1"
"script_fxid","dirt" //You can change the fxid to which you want, just be
sure to include it in the MAPNAME_FX.GSC

Make a script_origin, connect the FX to the script_origin for the FX to be
aimed at

Now when you trigger the trigger_use: you explode the wall, an explosion FX
is played, and you complete an objective


GSC SCRIPT


Simple script, not too complex. *****Just be aware how the
number of objective_current, objective_add, & objective_state
change as the objective changes!*****

Place the .GSC in: "Call of Duty\(main or uo)\maps"



CODE


main()

{

maps\_load::main();
maps\MAPNAME_FX::main();  //Precaches FX if you're going to use it

obj1(); //Call thread

}


obj1()
{

obj1 = getent("obj1", "targetname"); //Get entity(trigger_multiple) in map

objective_add(1, "active", &"mapname_OBJ1",getent("obj1",
"targetname").origin);

objective_current(1);

iprintlnbold (&"mapname_OBJECTIVES"); //Display objective in obj. list from
string

obj1 waittill("trigger"); //Waits till trigger_multiple is triggered

objective_state(1, "done"); //Objective 1 is done

obj1 delete(); //Delete trigger brush in-game so it will not be re-triggered

wait(2);

thread obj2(); //Move on to next objective

}

obj2()

{

obj2 = getent("obj2", "targetname"); //Get entity(German AI) in map

objective_add(2, "active", &"mapname_OBJ2",getent("obj2",
"targetname").origin);

objective_current(2);

iprintlnbold (&"mapname_OBJ2"); //Display objective in obj. list from string

obj2 waittill("death"); //Waits till German AI is killed

objective_state(2, "done"); //Objective 2 is done

wait(2);

thread obj3(); //Move on to next objective

}

obj3()
{

obj3 = getent("obj3", "targetname"); //Get entity(trigger_use) in map

objective_add(3, "active", &"mapname_OBJ3",getent("obj3",
"targetname").origin);

objective_current(3);

iprintlnbold (&"mapname_OBJ3"); //Display objective in obj. list from string

obj3 waittill("trigger"); //Waits till trigger_use is triggered

//In this interval of time the wall explodes and the FX is played
//if you included the FX GSC and map entities

objective_state(3, "done"); //Objective 3 is done

wait(2);

iprintlnbold (&"mapname_OBJ_COMPLETED"); //Let player know he is done
}



For a special effect for the sea wall explosion, you will need a FX file.
*****FX FILE SHOULD BE CALLED BE: MAPNAME_FX.GSC*****
Goes in: "Call of Duty\(main or uo)\maps"


CODE


main()
{
precacheFX();
}

precacheFX()
{
level._effect["dirt"] = loadfx ("fx/impacts/stukastrafe_dirt.efx");
}


 [FR]Sparks