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

Members Online

»
0 Active | 47 Guests
Online:

LATEST FORUM THREADS

»
BSP/FF Compiler Issue
CoD4 MP Mapping
COD: WAW Mapping & Steam
CoDWW MP Mapping
missing map name
CoD+UO General

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"
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 250
Last: Apr 29, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Monday, Apr. 10, 2017 03:03 am
Code:

make all brushes detail (except the ones you need structural for portals)


Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 44
Last: Jun 19, 2017
[view latest posts]
Level 2
Category: CoD2 SP Mapping
Posted: Tuesday, Apr. 11, 2017 01:13 pm
attachment: image(95.9Kb) image(85.3Kb)
Problem has been averted. I recently put more telephone wires around the village and I guess it was too much for the compiler to handle so I deleted most of them. I hope none of you all mind part of the village not having electricity. [drink]

UPDATE TIME:

Now that I won't be adding any more terrain patches to cause more errors, I have moved on to AI like I said last post. Since I got the compiler to work I was finally able to test my map again. Say hello to the first enemy in my map! The pictures posted show a sniper in the church tower which will also be the first objective. Expect more AI soon!

Hopefully no more errors, until then! [machine_gun]
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 44
Last: Jun 19, 2017
[view latest posts]
Level 2
Category: CoD2 SP Mapping
Posted: Saturday, Apr. 29, 2017 10:22 am
https://youtu.be/tMWlZnAEPnI

A small preview of what I have so far. [drink]
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 250
Last: Apr 29, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Saturday, Apr. 29, 2017 10:39 am
Wow looks really good!
Maybe add some Germans in the forest as well.
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 44
Last: Jun 19, 2017
[view latest posts]
Level 2
Category: CoD2 SP Mapping
Posted: Sunday, Jun. 18, 2017 11:58 am
Sorry for the hiatus, I had exams to take care of and immediately afterwards went on a family trip to Europe. However, I'm now back and have the whole summer to work on this map (hopefully even finish it?). [drink]

There has been 0% progress since the video I posted here so I'm hoping to continue working gradually. I have, unsurprisingly, encountered another problem when running my map:

Remember on the video that the first objective is to "kill the sniper?" Well as you saw in it, once the sniper died nothing happened. In my sloppy code I wanted the map to end after the sniper dies to see if the objective works (missionsuccess). I've posted the frost.gsc code below:

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!!

obj1();

}

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

obj1()
{

obj1 = getent("obj1", "targetname"); //Get entity(German AI) in map
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
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);
}


[confused] Again, I'm no programmer (yet) so I don't really understand anything. In radiant I named the "sniper" actor: obj1. His target is a node_cover_cround in the church tower which has a targetname of auto1. The trigger that spawns the "sniper" actor has a targetname of auto2. I hope someone could help me here and tell me what's wrong with the code or radiant keys/values. Thanks!

Also, I was using this tutorial: http://modsonline.com/Tutorials-read-260.html
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 497
Last: Jun 24, 2017
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Sunday, Jun. 18, 2017 12:23 pm
So the sniper is a spawner that you want to waittill death to notify map is done.

Classic deadend of all Singleplayer starter mappers/scripters, me included.

Trust me nobody was a scripter/programmer before sitting down and mess with scripting/programming.
Including me.

I looked on some other maps scripts and what I found is that they wait death on AI the same way you did it with some minor differences.

You have to give a key and a value on the AI spawner in radiant just like targetname.

But you need to do this:
key: script_noteworthy
value: obj1 (or any valid name you want)

I modified your obj1 function to show you what you need to do.
You can backup your original function just in case mine mess things up.

Good luck!

Code:
obj1() 
{ 
obj1 = getent("obj1", "script_noteworthy"); //Get entity(German AI) in map 
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"); 
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: 44
Last: Jun 19, 2017
[view latest posts]
Level 2
Category: CoD2 SP Mapping
Posted: Monday, Jun. 19, 2017 07:03 am
attachment: image(72.8Kb) image(78.5Kb)
Damn, if I knew you would respond so quickly I would've sticked around here longer. Anyways, about the objectives: I did as you said, I gave the sniper AI a key of script_noteworthy and value of obj1, compiled the map, used your code you provided, ran the map. But there was another problem: my attached pictures show that once the map loads and your first objective is being written out, it says all objectives completed and ends the map without having a chance to shoot the sniper. [confused]

I'm not sure what to do now; I'm guessing the script you provided mades the map think the sniper isn't alive since he's not spawned? I have no idea. Further help is much appreciated! [casanova]

Also, I would've posted a video to show what it looks like but I guess you can only use Bandicam once unless you want to uninstall and reinstall it again to use it a second time. Any good free screen recorders out there? No viruses please!
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 497
Last: Jun 24, 2017
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Monday, Jun. 19, 2017 07:15 am
Yeah it looks like the code does not see the AI as alive and can't properly define it. I think I must to an actual map test before giving you further solutions :/ I suggest using your previous script to make the rest of your tests. Good luck.
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 44
Last: Jun 19, 2017
[view latest posts]
Level 2
Category: CoD2 SP Mapping
Posted: Monday, Jun. 19, 2017 10:56 am
Thanks for your advice SPi, but it seems I have solved the problem. I decided not to make the sniper a spawner so I deleted the trigger and unchecked spawner. Complied the map, tested it and...

https://www.youtube.com/watch?v=6J22z_rfWOs

To be honest, this way feels half-assed but it works nonetheless. I'm planning on having a "kill the German officer" objective also in my map so I guess he won't be a spawner also? I'm sure there was a better way of doing this but I don't care. It works!

Now back to placing AI onthe map.... [2guns]
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 497
Last: Jun 24, 2017
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Monday, Jun. 19, 2017 11:58 am
Ye that's right. It works this way. I am just not entirely sure how this works while he is spawned with trigger in cod2. I know how to do it in cod4 but not in cod2.
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

»