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

Members Online

»
0 Active | 28 Guests
Online:

LATEST FORUM THREADS

»
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 

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

»