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

Members Online

»
0 Active | 7 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 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 4
Category: CoD4 SP Mapping
CoD 4 mapping and level design for single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: 2 case
Pablo_Abruzzi
General Member
Since: Jan 30, 2010
Posts: 93
Last: Aug 10, 2011
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Sunday, Jul. 18, 2010 05:20 pm
Hey

I'm preparing to start my first project mission, so I have two question about it.

1) First. Please tell me how I can do the written dialogues?
Like in this picture:



I only know how do something like that with recording voice, but I don't need it[wink]

2) How do enemy marine? I'm talking about changing soldiers class (just like in SP Blacklot)?

IF YOU KNOW ANSWER ABOUT ONLY ONE QUESTION PLEASE WRITE IT[biggrin]
I need your help.






Share |
lolwot
General Member
Since: May 16, 2010
Posts: 53
Last: Dec 15, 2015
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jul. 19, 2010 06:40 am
I believe SP Backlot comes with the source files, you should look through those as they will answer your questions.
Share |
Pablo_Abruzzi
General Member
Since: Jan 30, 2010
Posts: 93
Last: Aug 10, 2011
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jul. 19, 2010 03:31 pm
lolwot writes...
Quote:
I believe SP Backlot comes with the source files, you should look through those as they will answer your questions.


I check it, I find this in .str file:
Quote:
REFERENCE AMERICANS_ATTACKING LANG_ENGLISH "^2Insurgent: ^7American's are attacking!"


I'm sure this is dialogue. But I can't find Americans Attacking in .gsc file[confused]. Please help me, how activate this dialogue?

Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Tuesday, Jul. 20, 2010 02:19 am
he has it in his gsc this is the section:

Code:

setTeam( team )
{
	/*--------------------
	 CONFIGURES ARABIANS AS FRIENDLIES AND AMERICANS AS BADDIES
	----------------------*/
	self.team = team;
	if( team == "allies" )
	{
		self maps\_names::get_name_for_nationality( "arab" );
		self.goal_radius = 64;
	}
	else
	{
		// Couldn't figure out how to remove American names =0(
		// Null .name and .script_friendName cause switch statement errors in names utility
		// Not too important to spend time figuring out
		self.goal_radius  = 1024;
	}
} // setTeam()<br />
<br />



Share |
Pablo_Abruzzi
General Member
Since: Jan 30, 2010
Posts: 93
Last: Aug 10, 2011
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Tuesday, Jul. 20, 2010 09:50 am
Yes, but I'm sure that is not all, cause code is compiling, but Americans are still our friends.
I also find these lines:
Code:
// Set Up Teams
array_thread( getEntArray( "arabians", "script_noteworthy" ), ::add_spawn_function, ::setTeam, "allies" );

array_thread( getEntArray( "americans", "script_noteworthy" ), ::add_spawn_function, ::setTeam, "axis" );


It's in global scripts, and next:
Code:
// Non-Spawners
array_thread( getAiArray( "axis" ), ::setTeam, "allies" );

In GLOBAL/MISC THREADS, and I think that's all.
But I don't know how paste it to my .gsc file, look:

Code:
#include common_scripts\utility;

#include maps\_utility;

#include maps\_stealth_logic;


main()
{
   maps\_load::main();
   level.player takeallweapons();
   level.player giveWeapon ("m4_grenadier");
   level.player giveWeapon ("colt45");
   level.player switchToWeapon ("m4_grenadier");
   level.player giveWeapon ("fraggrenade");
   level.player giveWeapon ("flash_grenade");
thread im1(); 
}


im1()
{
friends =getentarray ("friend", "targetname");
for(i=0;i<friends.size;i++)
friends[i] thread maps\_utility::magic_bullet_shield();
thread patrol();
}

patrol()
{
friends =getentarray ("friend", "targetname");
for(i=0;i<friends.size;i++)
friends[i] enable_cqbwalk();
introscreen();
}

introscreen()
{
	level.intro_offset = ( -20 );
	lines = [];
	lines[ lines.size ] = &"Twierdza_INTROSCREEN_LINE_1";
	lines[ "date" ] = &"Twierdza_INTROSCREEN_LINE_2";
	lines[ lines.size ] = &"Twierdza_INTROSCREEN_LINE_3";
	lines[ lines.size ] = &"Twierdza_INTROSCREEN_LINE_5";
	maps\_introscreen::introscreen_feed_lines( lines );
	
	level.intro_offset = ( 0 );
	fade_time = ( 8 );
	time = ( 8.5 );
	maps\_introscreen::introscreen_generic_fade_in( "black", time, fade_time );
	
	flag_set( "introscreen_done" );
	level.player freezeControls( false );	
} 


setTeam( team )
{
	/*--------------------
	 CONFIGURES ARABIANS AS FRIENDLIES AND AMERICANS AS BADDIES
	----------------------*/
	self.team = team;
	if( team == "allies" )
	{
		self maps\_names::get_name_for_nationality( "arab" );
		self.goal_radius = 64;
	}
	else
	{
		// Couldn't figure out how to remove American names =0(
		// Null .name and .script_friendName cause switch statement errors in names utility
		// Not too important to spend time figuring out
		self.goal_radius  = 1024;
	}
} // setTeam()


I don't have sections global scripts and global/misc threads.


Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 SP Mapping
Posted: Tuesday, Jul. 20, 2010 05:55 pm
yea the first part is just stating that all guys with the those key values at the time of spawn are assigned to "x" team. in this case either axis or allies. the other part is for the guys that are already alive in the game and dont need to be spawn at the start of the map. if you have more questions maybe pm the author of the script for some extra help.
Share |
Pablo_Abruzzi
General Member
Since: Jan 30, 2010
Posts: 93
Last: Aug 10, 2011
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Wednesday, Jul. 21, 2010 08:44 am
Ok. So, if u want fight with Marines (just like in the SP backlot) you must:

1. Open you map and select all opforce spawn soldiers, and give them key/value:

Code:
Key: script_noteworthy 
Value: arabians


2. Select all spawn marines, and do the same, but with value: americans.

Save and close your radiant. Now write the script (in .gsc file):
Code:
#include common_scripts\utility;

#include maps\_utility;

#include maps\_stealth_logic;

#include maps\_anim;

#using_animtree( "generic_human" );

main()
{
	maps\_load::main();


array_thread( getAiArray( "axis" ), ::setTeam, "allies" );

array_thread( getEntArray( "arabians", "script_noteworthy" ), ::add_spawn_function, ::setTeam, "allies" );

array_thread( getEntArray( "americans", "script_noteworthy" ), ::add_spawn_function, ::setTeam, "axis" );

}

setTeam( team )
{
	self.team = team;
	if( team == "allies" )
	{
		self maps\_names::get_name_for_nationality( "arab" );
		self.goal_radius = 64;
	}
	else
	{
		
		self.goal_radius  = 1024;
	}
} 


And that's all.



EDIT: And if u want to create one friendly marine and second enemy, add this to ur code:
Code:
array_thread( getEntArray( "americans", "targetname" ), ::setTeam, "allies" );


And give ur Friendly marine Key and Value:

Key: targetname
Value: americans

Then u can see fight Marine vs. Marine [lol]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»