Members Online»
0 Active | 51 Guests
Online:
|
LATEST FORUM THREADS»
by StrYdeR
Posts: 3 / 144 The Future of MODSonline
In The News by KAZAM3766
Posts: 1 / 501 CoD: Battle Royale
CoD+UO Map + Mod Releases by morgawr
Posts: 1 / 2575 Damaged .pk3's
CoD Mapping by lazygit
Posts: 1 / 3092 heli to attack ai
CoD4 SP Mapping by DrBiggzz
Posts: 11 / 991 New Cod UO Rifle Mod.
CoD Mapping |
Polls»
|
First off, thanks to the objective tutorials in the COD1 mapping section.
COD4 Objectives
First create your world in radiant. Then create a trigger brush anywhere you like. This is where you would have to go to complete the objective. Make sure the trigger brush is trigger_multiple. The fill in this:
Key: targetname
value: obj1
If you want more objectives, create more triggers. Replace the value with obj2, obj3 and so on. To make an actor an objective, create the actor and give him the key of targetname and value of obj#. After you're done, finish your map and save! Complie your map!
Now is the time for scripting. It's fairly simple. Copy and paste this in your gsc file.
main()
{
maps\_load::main();
level.player takeallweapons();
level.player giveWeapon ("m16_basic"); //use whatever gun you want
level.player giveWeapon ("g36c"); //same
level.player switchToWeapon ("g36c"); //pick the gun you want to hold
level.player giveWeapon ("fraggrenade");
level.player giveWeapon ("flash_grenade");
thread obj1(); //call your objectives
}
obj1()
{
obj1 = getent("obj1", "targetname"); //the game finds the trigger
objective_add(1, "active", &"mapname_OBJ1",getent("obj1","targetname").origin); //add obj.
objective_current(1); //current objective
obj1 waittill("trigger"); //wait till the trigger is triggered
objective_state(1, "done");
obj1 delete(); //deletes it
wait(2); //fill in however long you like (in seconds)
thread obj2(); //thread next objectives.
}
obj2()
{
obj2 = getent("obj2", "targetname");
objective_add(2, "active", &"mapname_OBJ2",getent("obj2","targetname").origin);
objective_current(2);
obj2 waittill("trigger");
objective_state(2, "done");
obj2 delete();
wait(2);
thread obj3();
}
obj3()
{
obj3 = getent("obj3", "targetname");
objective_add(3, "active", &"mapname_OBJ3",getent("obj3","targetname").origin);
objective_current(3);
obj3 waittill("trigger");
objective_state(3, "done");
obj3 delete();
wait(2);
iprintlnbold (&"mapname_OBJ_COMPLETED"); //tells player obj finished
missionSuccess ("fun",false); //the mission ends
}
The script above is for trigger objectives. For actors replace
"obj# waittill("trigger");" with "obj# waittill("death");"
You can add more objectives if you like. Just repeat.
You're done the gsc file but scripting is not done yet!
create a mapname.str in your main/localizedstrings folder.
Copy this:
VERSION "1"
CONFIG "F:\projects\mk\bin\StringEd\StringEd.cfg"
FILENOTES ""
REFERENCE OBJ1
LANG_ENGLISH "Get to the centre of the road. Clear out the road block." //change to whatever you want for your objective.
REFERENCE OBJ2
LANG_ENGLISH "Get to your teammates!" //same
REFERENCE OBJ3
LANG_ENGLISH "Get on the truck." //same
REFERENCE OBJ_COMPLETED
LANG_ENGLISH "All Objective Completed!" //same
REFERENCE OBJECTIVES
LANG_ENGLISH "Press the |Tab| key to check your Objectives" //reminder
ENDMARKER
You can add more references for more objectives. Just add OBJ4, OBJ5, etc.
That's it you're done!
Time for infinite health. This is very simple.
In radiant, create some actors or just one. Give them a targetname of ally or whatever. You're done in radiant!
Script time!
I can't call the script from another gsc file because I don't know how to get it to work. Just copy and paste into your main gsc file.
thread ally_nodamage(); //whatever value you like for thread
ally_nodamage() //whatever you called above
{
allyteam =getentarray ("ally", "targetname"); //what you named
for(i=0;i
}
You're done! The infinite health works great for heroes or any regular actors, but not you, the player, unfortunately. Also thanx to http://www.modsonline.com/Forums-top-68372-30.html#59375
everyone who helped me on this topic.
Combine both tutorials together you get this. My map as an example.
main()
{
level.weaponClipModels = [];
level.weaponClipModels[0] = "weapon_m16_clip";
level.weaponClipModels[1] = "weapon_ak47_clip";
level.weaponClipModels[2] = "weapon_g36_clip";
level.weaponClipModels[3] = "weapon_mp5_clip";
maps\_load::main();
level.player takeallweapons();
level.player giveWeapon ("m16_basic");
level.player giveWeapon ("g36c");
level.player switchToWeapon ("g36c");
level.player giveWeapon ("fraggrenade");
level.player giveWeapon ("flash_grenade");
thread ally_nodamage(); // executes ally_nodamage() function
thread obj1();
}
ally_nodamage()
{
allyteam =getentarray ("ally", "targetname");
for(i=0;i
}
obj1()
{
obj1 = getent("obj1", "targetname");
objective_add(1, "active", &"streetclearing2_OBJ1",getent("obj1","targetname").origin);
objective_current(1);
obj1 waittill("trigger");
objective_state(1, "done");
obj1 delete();
wait(2);
thread obj2();
}
obj2()
{
obj2 = getent("obj2", "targetname");
objective_add(2, "active", &"streetclearing2_OBJ2",getent("obj2","targetname").origin);
objective_current(2);
obj2 waittill("trigger");
objective_state(2, "done");
obj2 delete();
wait(2);
thread obj3();
}
obj3()
{
obj3 = getent("obj3", "targetname");
objective_add(3, "active", &"streetclearing2_OBJ3",getent("obj3","targetname").origin);
objective_current(3);
obj3 waittill("trigger");
objective_state(3, "done");
obj3 delete();
wait(2);
iprintlnbold (&"streetclearing2_OBJ_COMPLETED"); //Let player know he is done
missionSuccess ("dawnville",false);
}
Thanx for reading, hope you make great Single Player maps!
Check out the download section for this tutorial. http://www.modsonline.com/Downloads-full-5112.html I wrote the wrong name; there should be one more 0. It should be sam_fisher3000. Anyway, you know the file is by me.:D
P.S. This Tutorial can be used for all COD games.
by sam_fisher3000
Latest Syndicated News»
Comments: 5
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which... Comments: 5
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ... Comments: 5
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead?
... Comments: 5
Codutility.com up and runn...
It seems to me the like the site is completely dead? Comments: 5
Codutility.com up and runn...
Yeeaahhhh.........
|
Latest Downloads»
OHMY Don Quixote
Call of Duty 2: Maps: Multiplayer (5.76Mb) OHMY Neuburg
Call of Duty 2: Maps: Multiplayer (6.84Mb) OHMY Tebessa
Call of Duty 2: Maps: Multiplayer (7.36Mb) OHMY POW Camp
Call of Duty 2: Maps: Multiplayer (2.15Mb) OHMY Valley
Call of Duty 2: Maps: Multiplayer (5.7Mb) |
Partners & Friends»
|
Site Links and Information
|
Partners
|
Friends
|
Copyright © MODSonline LLC
Tresware Content Management System © 2011
Website Designed by LKFX and Developed by Tresware