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

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
Single Player Loadout
CoDWW SP Mapping
Radio audio filter?
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
Category: CoD+UO General
General game questions, comments, and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Anyway to change ctf icon size
sargehobo
General Member
Since: Apr 14, 2007
Posts: 8
Last: May 26, 2012
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Monday, May. 21, 2012 06:29 pm
Was wondering if there is anyway to change the size of the carriers icon while holding the flag. So it 's smaller and won't show out of walls and roofs.
Thanks for any help.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD+UO General
Posted: Tuesday, May. 22, 2012 09:44 am
is the icon a (scripted) hud element?

if setshader was involved, then it could be scaled. But there might also be a cvar to change it...
Share |
sargehobo
General Member
Since: Apr 14, 2007
Posts: 8
Last: May 26, 2012
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Tuesday, May. 22, 2012 05:44 pm
I believe it is a hud element not sure where to find it to change. I would have thought it would be in the ctf.gsc file but not sure what element, I changed one thing and it just changed the icon size in the hud, not the icon above the player.
I don't know of any cvar that would change the size that would have been great.

I did find this.........not sure how to change tho...it has a setshader

Code:
ctf()
{
	level.allies_flag = getent("ctf_flag_allies", "targetname");
	
	if ( !isDefined(level.allies_flag) )
	{
		maps\mp\_utility::error("NO ALLIED FLAG IN MAP");
		return;
	}
	
	// get the mobile version of the flag
	level.allies_flag.mobile_model = getent("ctf_flag_allies_mobile", "targetname");
	if ( !isDefined(level.allies_flag.mobile_model) )
	{
		maps\mp\_utility::error("NO ALLIED MOBILE FLAG IN MAP");
		return;
	}
	level.allies_flag.mobile_model SetContents(0);
	
	level.allies_flag.icon = newHudElem();
	level.allies_flag.icon.alignX = "left";
	level.allies_flag.icon.alignY = "top";
	level.allies_flag.icon.x = game["flag_icons_x"];
	level.allies_flag.icon.y = game["flag_icons_y"];
	level.allies_flag.icon.sort = -50; // To fix a stupid bug, where the first flag icon (or the one to the furthest left) will not sort through the capping icon. BAH!
	level.allies_flag.icon setShader(game["hud_allies_flag"], game["flag_icons_w"], game["flag_icons_h"]);

	level.allies_flag.mobile_model hide();	
	level.allies_flag.team = "allies";
	level.allies_flag.hudnum = 1;
	level.allies_flag thread ctf_spawn_flag();
	level.allies_flag thread flag_think();

	level.axis_flag = getent("ctf_flag_axis", "targetname");
	
	if ( !isDefined(level.axis_flag) )
	{
		maps\mp\_utility::error("NO AXIS FLAG IN MAP");
		return;
	}
	
	// get the mobile version of the flag
	level.axis_flag.mobile_model = getent("ctf_flag_axis_mobile", "targetname");
	level.axis_flag.mobile_model SetContents(0);

	if ( !isDefined(level.axis_flag.mobile_model) )
	{
		maps\mp\_utility::error("NO ALLIED MOBILE FLAG IN MAP");
		return;
	}

	level.axis_flag.icon = newHudElem();
	level.axis_flag.icon.alignX = "left";
	level.axis_flag.icon.alignY = "top";
	level.axis_flag.icon.x =game["flag_icons_x"]  + game["flag_icons_w"] + game["flag_icons_spacing"];
	level.axis_flag.icon.y = game["flag_icons_y"];
	level.axis_flag.icon.sort = -50; // To fix a stupid bug, where the first flag icon (or the one to the furthest left) will not sort through the capping icon. BAH!
	level.axis_flag.icon setShader(game["hud_axis_flag"], game["flag_icons_w"], game["flag_icons_h"]);

	level.axis_flag.mobile_model hide();	
	level.axis_flag.team = "axis";
	level.axis_flag.hudnum = 2;
	level.axis_flag thread ctf_spawn_flag();
	level.axis_flag thread flag_think();
}


edited on May. 22, 2012 05:45 pm by sargehobo
Share |
sargehobo
General Member
Since: Apr 14, 2007
Posts: 8
Last: May 26, 2012
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Tuesday, May. 22, 2012 06:11 pm
attachment: application(24.2Kb)
Attached is the full ctf.gsc just incase I found the wrong section above.

Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD+UO General
Posted: Tuesday, May. 22, 2012 06:21 pm
well either way...

2nd and 3rd parameter of setShader is width and height

but scaleovertime should work as well using a transition time of 0.05, width and height 16

Code:
	level.axis_flag.icon setShader(game["hud_axis_flag"], int(game["flag_icons_w"] / 2), int(game["flag_icons_h"] / 2));

	level.axis_flag scaleovertime(0.05, 16, 16);
Share |
sargehobo
General Member
Since: Apr 14, 2007
Posts: 8
Last: May 26, 2012
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Tuesday, May. 22, 2012 09:57 pm
The scaleovertime doesn't seem to work, when I change the game type to ctf the map won't load.


Changing the 2 and 3 does adjust the height and width but of the HUD icon not the players headicon size.

Perhaps I'm looking at the wrong section of the ctf or maybe even the wrong script area.

Thanks for the help so far.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD+UO General
Posted: Tuesday, May. 22, 2012 11:53 pm
sargehobo writes...
Quote:
The scaleovertime doesn't seem to work, when I change the game type to ctf the map won't load.


Changing the 2 and 3 does adjust the height and width but of the HUD icon not the players headicon size.

Perhaps I'm looking at the wrong section of the ctf or maybe even the wrong script area.

Thanks for the help so far.


The carry icon isn't an icon at all. It is a model. The only way to change it's characteristics is to completely remake it altogether.

The only other thing to do is to stop using a model for the carry indicator altogether, and switch to using a headicon. You wont have any control over its size as it is hard coded into the engine, but it wont show through objects (although I wasn't aware that the carry models showed through buildings) as headicons are objective shaders and hide when behind a solid object.

I don't currently have UO (or COD1) install on my rig so I can't show you any scripting changes, but if you post the UO CTF script I could do it from there.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD+UO General
Posted: Tuesday, May. 22, 2012 11:55 pm
Sevenz writes...
Quote:
is the icon a (scripted) hud element?

if setshader was involved, then it could be scaled. But there might also be a cvar to change it...


It's not a shader - it is a model. They didn't have waypoints in COD1/UO, so they got around it by using models. You can't change the characteristics of a model in UO unless you completely remake the model.
Share |
sargehobo
General Member
Since: Apr 14, 2007
Posts: 8
Last: May 26, 2012
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Wednesday, May. 23, 2012 03:06 pm
attachment: application(24.2Kb)
Here is the ctf.gsc file.

It's to large to post in a reply so I have to make it an attachement


Thanks for the help it's greatly appreciated.

Share |
sargehobo
General Member
Since: Apr 14, 2007
Posts: 8
Last: May 26, 2012
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Saturday, May. 26, 2012 05:29 pm
I seem to have found a work around by creating new dds files. skins/ctf_flag_b_1.dds , skins/ctf_flag_g_1.dds , skins/ctf_flag_r_1.dds and skins/ctf_flag_us_1.dds. Made sure the file was at 256 x 256 and made the alpha channels the way I wanted.


If there's another fix I'd love to know but this works.

Thanks for the help
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty : CoD+UO General

Latest Syndicated News

»
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.
Loadout
Gun Crafting to the Max. edited on Sep. 25, 2012 06:57 pm by Morp...
Introducing the Source Fil...
Surprised this wasn't made a long time ago. Sounds like a nice little feature.
Introducing the Source Fil...
The Source Filmmaker (SFM) is the movie-making tool built and used by us he...

Partners & Friends

»