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

Members Online

»
0 Active | 64 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP 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 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: image in hardpoints
JackBauer
General Member
Since: May 30, 2010
Posts: 52
Last: Apr 15, 2011
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 07:42 pm
ok guys wondering if someone could guide me please.

when you get the airstrike a ticker tape effect comes onscreen saying:

6 kill streak: press 6 for airstrike.
if i wanted an image also to appear like airstike symbol what would i have to do to get it to work, and then disapear after the ticker has finished?

please
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 07:45 pm
I did this to notify a player when they had all weapons and perks unlocked in my PowerClass feature:

Code:
AnnounceDone()
{
	notifyData = spawnStruct();
	notifyData.notifyText = &"DEMON_PROMOTED";
	notifyData.glowAlpha = 1;
	notifyData.glowColor = (0.2, 0.3, 0.7);
	notifyData.iconName = game["demonlogo"];
	notifyData.sound = "mp_level_up";
	notifyData.duration = 4.0;
	
	self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
Share |
JackBauer
General Member
Since: May 30, 2010
Posts: 52
Last: Apr 15, 2011
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 07:47 pm
ok got that, but i would like to have different symbols for the different killstreak awards so.....

what i'm asking is:
would i have to add what you have kindly put inside the hardpoints.gsc file for each of the symbols or what?
Share |
JackBauer
General Member
Since: May 30, 2010
Posts: 52
Last: Apr 15, 2011
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 08:06 pm
ok demonseed i see what your saying but that only announces the single text for the promotion. so the text stays the same.

what i want to do is somehow have a different symbol for each of the kill streaks, such as the uav,hellicopter,airstrike,nuke.

i saw this:

Code:
streakNotify( streakVal )
{
	self endon("disconnect");

	// wait until any challenges have been processed
	self waittill( "playerKilledChallengesProcessed" );
	wait .05;
	
	notifyData = spawnStruct();
	notifyData.titleLabel = &"MP_KILLSTREAK_N";
	notifyData.titleText = streakVal;
	
	self maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
	
	iprintln( &"RANK_KILL_STREAK_N", self, streakVal );
}


i presume this is what i'm looking for?
but what would i have to do to get it to recognise each killstreak symbol please?
Share |
JackBauer
General Member
Since: May 30, 2010
Posts: 52
Last: Apr 15, 2011
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 08:16 pm
would i have to do something like this?

Code:
hardpointNotify( hardpointType, streakVal )
{
	self endon("disconnect");
	
	// wait until any challenges have been processed
//	self waittill( "playerKilledChallengesProcessed" );
	wait .05;
	
	notifyData = spawnStruct();
	notifyData.titleLabel = &"MP_KILLSTREAK_N";
	notifyData.titleText = streakVal;
	notifyData.notifyText = level.hardpointHints[hardpointType];
	
	if( hardpointType != "radar_mp" )
	{
		notifyData.sound = level.hardpointInforms[hardpointType];
		notifyData.leaderSound = hardpointType;
		notifyData.iconName = game["uavlogo"];
		notifyData.duration = 4.0;
	}
	
	self maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}



and then just stack each killstreak award onto of each other?
Share |
JackBauer
General Member
Since: May 30, 2010
Posts: 52
Last: Apr 15, 2011
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 08:21 pm
or am i waaaaaaaaaay off track here in what i want to achieve?
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 09:04 pm
I came up with this:

Code:
hardpointNotify( hardpointType, streakVal )
{
	self endon("disconnect");
	
	// wait until any challenges have been processed
	self waittill( "playerKilledChallengesProcessed" );
	wait .05;
	
	notifyData = spawnStruct();
	notifyData.titleLabel = &"MP_KILLSTREAK_N";
	notifyData.titleText = streakVal;
	notifyData.notifyText = level.hardpointHints[hardpointType];
	notifyData.sound = level.hardpointInforms[hardpointType];
	notifyData.leaderSound = hardpointType;
	notifyData.iconName = getImage( hardpointType );
	notifyData.duration = 4.0;
	
	self maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}

getImage( hardpointType )
{
	image = undefined;
	switch( hardpointType )
	{
		case "radar_mp":
			image = "uavimage";
			break;
		
		case "airstrike_mp":
			image = "airstrikeimage";
			break;
			
		case "helicopter_mp":
			image = "helicopterimage";
			break;
	}
	
	return image;
}
Share |
JackBauer
General Member
Since: May 30, 2010
Posts: 52
Last: Apr 15, 2011
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 10:32 pm
thanks for the reply demon i appreciate your help.

all i need to know now is what script do i need to add to this in order to position the icons?

and to finish do i put my icons in th materials folder or the images folder?

sorry for all the questions.
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 10:40 pm
JackBauer writes...
Quote:
thanks for the reply demon i appreciate your help.

all i need to know now is what script do i need to add to this in order to position the icons?

and to finish do i put my icons in th materials folder or the images folder?

sorry for all the questions.


the icon is positioned automatically centre screen just below the notification text.

And you have to compile materials and IWI files into your mod.ff file, and put copies of the IWI files in your mod IWD file.
Share |
JackBauer
General Member
Since: May 30, 2010
Posts: 52
Last: Apr 15, 2011
[view latest posts]
Level 3
Category: CoD4 Scripting
Posted: Tuesday, Jul. 27, 2010 11:37 pm
gotcha thank you but i am getting this:


Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

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

»