| Author |
Topic: Anyway to change ctf icon size |
| sargehobo |
General Member Since: Apr 15, 2007 Posts: 11 Last: May 16, 2015 [view latest posts] |
|
|
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
|
| sargehobo |
General Member Since: Apr 15, 2007 Posts: 11 Last: May 16, 2015 [view latest posts] |
|
|
|
Category: CoD+UO General Posted: Wednesday, May. 23, 2012 12:44 am |
 |
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 |
 |
|
|
| sargehobo |
General Member Since: Apr 15, 2007 Posts: 11 Last: May 16, 2015 [view latest posts] |
|
|
|
|
| Sevenz |
 |
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
Category: CoD+UO General Posted: Wednesday, May. 23, 2012 01:21 am |
 |
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); |
 |
|
|
| sargehobo |
General Member Since: Apr 15, 2007 Posts: 11 Last: May 16, 2015 [view latest posts] |
|
|
|
|
| Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
|
Category: CoD+UO General Posted: Wednesday, May. 23, 2012 06:53 am |
 |
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. |
 |
|
|
| Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
|
Category: CoD+UO General Posted: Wednesday, May. 23, 2012 06:55 am |
 |
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. |
 |
|
|
| sargehobo |
General Member Since: Apr 15, 2007 Posts: 11 Last: May 16, 2015 [view latest posts] |
|
|
|
|
| sargehobo |
General Member Since: Apr 15, 2007 Posts: 11 Last: May 16, 2015 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|