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

Members Online

»
0 Active | 71 Guests
Online:

LATEST FORUM THREADS

»
AI way
CoD 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 2
Category: CoD2 SP Mapping
Call of Duty 2 single player mapping, scripting and everything single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Previous Page Next Page
subscribe
Author Topic: My first SP map: "frost"
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Saturday, Jun. 24, 2017 04:58 am
Try to spawn him through a script that is activated by a trigger...
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 511
Last: Oct 13, 2017
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Saturday, Jun. 24, 2017 06:05 am
antonio, i think he might need you to elaborate. He said he is beginner enough to hardly understand the script part so it would be a good idea to provide him some elaborated details on how to do that.
Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Saturday, Jun. 24, 2017 06:19 am
Well, you make an AI and tick spawner...make a triger( name it however you want)...then the script comes
Code:

obj1() 
{ 
obj_1_trigger=getent("cname of the objective trigger", "targetname");
obj_1_trigger= waittill ("trigger");
wait(0.25);
obj_1=getent("name of the AI sniper", "targetname" );
obj_1_spawn = obj_1 dospawn();
wait(0.25);
objective_add(1, "active", &"FROST_OBJ1",getent("obj1", "script_noteworthy").origin); 
objective_current(1); 
iprintlnbold ("Press the |Tab| key to check your Objectives");
if(isAlive(obj1)) 
obj1 waittill("death");//OR TRY obj_1_spawn waittill("death");
objective_state(1, "done"); //Objective 1 is done 
wait(2); 
iprintlnbold (&"FROST_OBJ_COMPLETED"); //Let player know he is done 
wait(3); 
missionSuccess ("dawnville",false);
}
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 57
Last: Sep 22, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Monday, Jun. 26, 2017 06:55 am
attachment: image(136.6Kb) image(115.8Kb) image(94.7Kb)
Update time; I am happy to say that all of the objectives have already been made! [drink][thumbs_up]

Though, they're not really complex objectives, mostly just kill him, pick up that, put it there, and go there. I've attached some screenshots of some of my objectives, I even got them to shine yellow. About the sniper spawning issue: I don't really care enough to make him a spawner and test several times to see if the objective works. The map works fine as of right now. Perhaps when I'll release the source files with the map download you guys can see all the mistakes and errors I've made with the map. [biggrin]

Here is my frost.gsc file right now, to give you a glimpse of what my objectives are.
Code:
#include maps\_utility;

#include maps\_anim;

#using_animtree("generic_human");

main()
{
maps\_load::main();
ambientPlay("ambient");
setCullFog (500, 10000, 0.0274, 0.0823, 0.1607, 0 );
setEnvironment ("cold");

//////////PLAYER SETUP//////////

level.player setViewmodel( "xmodel/viewmodel_hands_russian" );
level.player takeallweapons();
level.player giveWeapon ("colt");
level.player giveWeapon ("fraggrenade");
level.player switchToWeapon ("colt");

//////////INTRO SCREEN//////////

precacheshader("black"); // Precaches the black shader
precacheString(&"FROST_INTRO_1"); // The title of the Level
precacheString(&"FROST_INTRO_2"); // Where the level takes place
precacheString(&"FROST_INTRO_3"); // Month Day, Year
precacheString(&"FROST_INTRO_4"); // Optional info about the level
maps\_introscreen::introscreen_delay(&"FROST_INTRO_1", &"FROST_INTRO_2", &"FROST_INTRO_3", &"FROST_INTRO_4"); // Action!!

//////////HIDE FLASHING OBJECTIVES//////////

obj5 = getent("obj5", "targetname");
obj2_flash = getent("obj2_flash", "targetname");
obj4_flash = getent("obj4_flash", "targetname");
obj5_flash = getent("obj5_flash", "targetname");
obj6_flash = getent("obj6_flash", "targetname");
obj5 hide();
obj2_flash hide();
obj4_flash hide();
obj5_flash hide();
obj6_flash hide();
obj1();
}

//////////OBJECTIVES//////////

obj1()
{
obj1 = getent("obj1", "targetname"); //Get entity(German AI) in map
block1 = getent("block1", "targetname");
objective_add(1, "active", &"FROST_OBJ1",getent("obj1", "targetname").origin);
objective_current(1);
iprintlnbold ("Press the |Tab| key to check your Objectives"); 
obj1 waittill("death"); //Waits till German AI is killed
block1 delete();
objective_state(1, "done"); //Objective 1 is done
maps\_utility::levelStartSave();
wait(2);
thread obj2();
}

obj2()
{
obj2 = getent("obj2", "targetname");
obj2_flash = getent("obj2_flash", "targetname");
block2 = getent("block2", "targetname");
trigg_obj2 = getent("trigg_obj2", "targetname");
obj2_flash show();
objective_add(2, "active", &"FROST_OBJ2",getent("obj2", "targetname").origin);
objective_current(2);
trigg_obj2 waittill("trigger");
trigg_obj2 delete();
obj2 delete();
obj2_flash delete();
block2 delete();
objective_state(2, "done");
maps\_utility::levelStartSave();
wait(2);
thread obj3();
}

obj3()
{
obj3 = getent("obj3", "targetname"); //Get entity(German AI) in map
block3 = getent("block3", "targetname");
objective_add(3, "active", &"FROST_OBJ3",getent("obj3", "targetname").origin);
objective_current(3); 
obj3 waittill("death"); //Waits till German AI is killed
block3 delete();
objective_state(3, "done"); //Objective 3 is done
maps\_utility::levelStartSave();
wait(2);
thread obj4();
}

obj4()
{
obj4 = getent("obj4", "targetname");
obj4_flash = getent("obj4_flash", "targetname");
block4 = getent("block4", "targetname");
trigg_obj4 = getent("trigg_obj4", "targetname");
obj4_flash show();
objective_add(4, "active", &"FROST_OBJ4",getent("obj4", "targetname").origin);
objective_current(4);
trigg_obj4 waittill("trigger");
trigg_obj4 delete();
obj4 delete();
obj4_flash delete();
block4 delete();
objective_state(4, "done");
maps\_utility::levelStartSave();
wait(2);
thread obj5();
}

obj5()
{
obj5 = getent("obj5", "targetname");
obj5_flash = getent("obj5_flash", "targetname");
block5 = getent("block5", "targetname");
trigg_obj5 = getent("trigg_obj5", "targetname");
obj5_flash show(); 
objective_add(5, "active", &"FROST_OBJ5",getent("obj5", "targetname").origin);
objective_current(5);
trigg_obj5 waittill("trigger");
obj5 show();
obj5_flash delete();
trigg_obj5 delete();
block5 delete();
objective_state(5, "done");
maps\_utility::levelStartSave();
wait(2);
thread obj6();
}

obj6()
{
obj6 = getent("obj6", "targetname");
obj6_flash = getent("obj6_flash", "targetname");
block6 = getent("block6", "targetname");
trigg_obj6 = getent("trigg_obj6", "targetname");
obj6_flash show();  
objective_add(6, "active", &"FROST_OBJ6",getent("obj6", "targetname").origin);
objective_current(6);
trigg_obj6 waittill("trigger");
trigg_obj6 delete();
obj6 delete();
obj6_flash delete();
block6 delete();
objective_state(6, "done");
maps\_utility::levelStartSave();
wait(2);
thread obj7();
}

obj7()
{
trigg_obj7 = getent("trigg_obj7", "targetname"); 
objective_add(7, "active", &"FROST_OBJ7", (-4288, 17440, -544));
objective_current(7);
trigg_obj7 waittill("trigger");
objective_state(7, "done");
trigg_obj7 delete();
wait(1);
iprintlnbold (&"FROST_OBJ_COMPLETED"); //Let player know he is done
missionSuccess ("dawnville",false);
}


Also, finishing objectives has made me that much closer to releasing this map, up next I need to place all the AI in. time to update the list from page 6:
1) Terrain
2) Spawning AI
3) Objectives and saves
4) Effects (FX)
5) Sounds/music
6) Making a .IWD file

Thanks for tuning in, until the next update! [wave]
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 511
Last: Oct 13, 2017
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Tuesday, Jun. 27, 2017 06:00 am
Good luck mate! [thumbs_up]
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 57
Last: Sep 22, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Wednesday, Jun. 28, 2017 11:14 am
attachment: image(906.4Kb)
So many damn lines...

In other words, I'm almost finished placing the AI in the first part of the village. However, as seen in the attached photo, it gets pretty messy fast. Thank goodness for layers!
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 511
Last: Oct 13, 2017
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Wednesday, Jun. 28, 2017 12:56 pm
attachment: image(1,849.4Kb)
Oh you haven't seen anything yet xD
I've attached a pic of one of my campaign missions in COD4.
That - is - messy.
BTW I started messing with cod2 mapping too.
Do you have steam or smth? so we can chat and help eachother?
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 57
Last: Sep 22, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Thursday, Jun. 29, 2017 07:08 am
Holy $hit SPi, what am I looking at? Why is it so colorful? Also, I've just made a steam account, unsure how to use it though. My profile name is rr0162.
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 57
Last: Sep 22, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Thursday, Jun. 29, 2017 12:28 pm
attachment: image(631.2Kb)
Well it looks like I've encountered another problem, and I feel like giving up on this map. [duh]

When testing the map in-game, some of the AI doesn't spawn like it should be. The triggers and spawners are all connected so it should work. I have a hunch that there could be a maximum amount of enemies/actors are allowed on maps for them to function. My attached photo shows just how many AIs are spawned when walking through some triggers. There are 58 yellow lines, yup 58 AIs. Maybe I'm going overkill with the amount of AI? I just don't know anymore. [confused]

CoD2 is really starting to annoy me. There seems to be a problem with something all the time. [mad] Help?
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 511
Last: Oct 13, 2017
[view latest posts]
Level 6
Category: CoD2 SP Mapping
Posted: Thursday, Jun. 29, 2017 03:00 pm
That's how COD mapping is. Constant problems and errors. Maximum AI is 32. 58 is too much yes. Try to spawn them in smaller amounts or make them respawn. There are tuts around on how to do this. What you saw in my pic was a complex combination of script and world entitles in a cod4 map. Which takes a lot of patience, nummerous errors to fix and struggle to learn what went wrong each time. Hope you find your way around.
As for steam, I think you need to buy smth so you can access the Friends feature so not sure if I can help you with it at this point.
Anyway good luck.
Share |
Restricted Access Restricted Access
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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

»