Floating Icon (with Icon in HUD) [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Havoc 526
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 317
Joined: Sat Apr 04, 2009 6:24 pm
Projects :: Something
Games I'm Playing :: Xenoblade Splatoon
Location: Howling at the Moon

Floating Icon (with Icon in HUD) [Solved]

Post by Havoc 526 »

Okay, I think the title explains it all, but I think this picture would make it more clear.
Hidden/Spoiler:
Image

Image
Here's my hud file (All credit for the models goes to their respective makers.)
Hidden/Spoiler:
ViewPort("Transforms")
{
EventNameFilter("player%")
TransformNameMesh("player1weapon1")
{
// Take a weapon-change, give back a different mesh name to be displayed.
EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")

// Make these meshes appear as another mesh in the BF2 HUD spot
// from the file 1playerhud.hud.
// The point is to replace "hud_droideka_shield" with a mesh that you create
// which exists but is invisible. The mesh MUST exist!
// If you do that, then that gets rid of the midscreen floating weapon display
// for our new weapons.
NameMesh("rep_weap_dc15st", "invisible_mesh")
NameMesh("rep_hyper_sniper", "invisible_mesh")
NameMesh("rep_weap_dc17sniper", "invisible_mesh")
NameMesh("rep_weap_dc17blast", "invisible_mesh")
NameMesh("rep_weap_dc15carbine", "invisible_mesh")
NameMesh("rep_weap_inf_pistol_mini_r", "invisible_mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.000000, 1.00000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")
Model3D("player1weapon1mesh")
{
// Instead of using player1.weapon1.mesh, which was replaced in the
// NameMesh() with hud_droideka_shield, we're using the actual
// mesh of the weapon that the player switched to, which is
// still rep_weap_inf_rifle or arcrifle or whatnot.
EventMesh("player1.weapon1.change")

Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")

// This model should be offscreen and invisible if the weapon
// is not defined below - this is to avoid showing duplicates of
// weapons that already are defined in the BF2 1playerhud.hud file.
// To accomplish that, scale to 0 and place offscreen.
Scale(0, 0, 0)
Position(500, 500, 500, "viewport")

// Now, for our new weapons only, reposition this icon and display it.
MeshInfo("rep_weap_dc15st")
{
Viewport(1)
Position(-0.219723, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
}
MeshInfo("rep_hyper_sniper")
{
Viewport(1)
Position(-0.249442, 0.359076, 0.007261, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_dc17sniper")
{
Viewport(1)
Position(-0.219723, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_dc17blast")
{
Viewport(1)
Position(-0.249442, 0.359076, 0.007261, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_dc15carbine")
{
Viewport(1)
Position(-0.249442, 0.359076, 0.007261, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_inf_pistol_mini_r")
{
Viewport(1)
Position(-0.219723, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
}
}
}
}
I've been looking for a way to fix this for a while now, but I can't find anything! This wouldn't have anything to do with "invisible_mesh", now would it?
Last edited by Havoc 526 on Thu Mar 03, 2011 7:20 pm, edited 1 time in total.
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Floating Icon (with Icon in HUD)

Post by Jendo7 »

I think if you have the extraweapons.hud and the com_inv_mesh for more than one side, that can happen. Just put one hud file and com_inv_mesh in one side folder for all the weapons, and sides you're loading.
User avatar
Havoc 526
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 317
Joined: Sat Apr 04, 2009 6:24 pm
Projects :: Something
Games I'm Playing :: Xenoblade Splatoon
Location: Howling at the Moon

Re: Floating Icon (with Icon in HUD)

Post by Havoc 526 »

You mean I actually have to make a new msh file for this? I thought that was the problem.

...But the kicker to me is that I only have an extraweapons.hud on ONE side (rep).
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Floating Icon (with Icon in HUD)

Post by Jendo7 »

No, just the one you have already, but if you have only got one side you've added it to anyway, I'm not sure why that would happen. Hopefully someone else might know, sorry.
User avatar
Havoc 526
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 317
Joined: Sat Apr 04, 2009 6:24 pm
Projects :: Something
Games I'm Playing :: Xenoblade Splatoon
Location: Howling at the Moon

Re: Floating Icon (with Icon in HUD)

Post by Havoc 526 »

I think it has to do with the con_inv_mesh, or Invisible_mesh, or whatever it is called.


...I don't think I have one.
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Floating Icon (with Icon in HUD)

Post by Jendo7 »

Yeah, you have to put the com_inv_mesh.msh in your sides msh folder, so if you haven't got one that could well be the problem.
User avatar
Havoc 526
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 317
Joined: Sat Apr 04, 2009 6:24 pm
Projects :: Something
Games I'm Playing :: Xenoblade Splatoon
Location: Howling at the Moon

Re: Floating Icon (with Icon in HUD)

Post by Havoc 526 »

Okay, so how do I make one?
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Floating Icon (with Icon in HUD)

Post by Jendo7 »

You don't need to make one, I thought it was in Fragme!'s Icon tutorial download. Here:
http://www.gamefront.com/files/Floating ... einfo.html
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Floating Icon (with Icon in HUD)

Post by skelltor »

I had this problem in bfsm and nothing anybody suggested helpped so just playing around I added the weapons name again in the first part
ie
Hidden/Spoiler:
ViewPort("Transforms")
{
EventNameFilter("player%")
TransformNameMesh("player1weapon1")
{
// Take a weapon-change, give back a different mesh name to be displayed.
EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")

// Make these meshes appear as another mesh in the BF2 HUD spot
// from the file 1playerhud.hud.
// The point is to replace "hud_droideka_shield" with a mesh that you create
// which exists but is invisible. The mesh MUST exist!
// If you do that, then that gets rid of the midscreen floating weapon display
// for our new weapons.
NameMesh("rep_weap_dc15st", "invisible_mesh")
NameMesh("rep_hyper_sniper", "invisible_mesh")
NameMesh("rep_weap_dc17blast", "invisible_mesh")
NameMesh("rep_weap_dc17sniper", "invisible_mesh")
NameMesh("rep_weap_dc17blast", "invisible_mesh")
NameMesh("rep_weap_dc15carbine", "invisible_mesh")
NameMesh("rep_weap_inf_pistol_mini_r", "invisible_mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.000000, 1.00000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")
Model3D("player1weapon1mesh")
{
// Instead of using player1.weapon1.mesh, which was replaced in the
// NameMesh() with hud_droideka_shield, we're using the actual
// mesh of the weapon that the player switched to, which is
// still rep_weap_inf_rifle or arcrifle or whatnot.
EventMesh("player1.weapon1.change")

Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")

// This model should be offscreen and invisible if the weapon
// is not defined below - this is to avoid showing duplicates of
// weapons that already are defined in the BF2 1playerhud.hud file.
// To accomplish that, scale to 0 and place offscreen.
Scale(0, 0, 0)
Position(500, 500, 500, "viewport")

// Now, for our new weapons only, reposition this icon and display it.
MeshInfo("rep_weap_dc15st")
{
Viewport(1)
Position(-0.219723, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
}
MeshInfo("rep_hyper_sniper")
{
Viewport(1)
Position(-0.249442, 0.359076, 0.007261, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_dc17sniper")
{
Viewport(1)
Position(-0.219723, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_dc17blast")
{
Viewport(1)
Position(-0.249442, 0.359076, 0.007261, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_dc15carbine")
{
Viewport(1)
Position(-0.249442, 0.359076, 0.007261, "Viewport")
Rotation(0.804269, 90.747269, 359.999695)
Scale(1.140000, 1.140000, 1.140000)
}
MeshInfo("rep_weap_inf_pistol_mini_r")
{
Viewport(1)
Position(-0.219723, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
}
}
}
}
User avatar
Havoc 526
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 317
Joined: Sat Apr 04, 2009 6:24 pm
Projects :: Something
Games I'm Playing :: Xenoblade Splatoon
Location: Howling at the Moon

Re: Floating Icon (with Icon in HUD) (SOLVED WITH REVENGE)

Post by Havoc 526 »

HEY GUYS! I DID IT! I'M SO HAPPY!!! THANK YOU FOR YOUR HELP!!!!!

....Calming down now. It was all because of the com_inv_mesh.msh (or lack thereof).
Post Reply