Page 1 of 1

Floating Icon (with Icon in HUD) [Solved]

Posted: Thu Mar 03, 2011 5:27 pm
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?

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 6:06 pm
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.

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 6:14 pm
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).

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 6:32 pm
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.

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 6:38 pm
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.

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 6:48 pm
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.

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 6:52 pm
by Havoc 526
Okay, so how do I make one?

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 6:59 pm
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

Re: Floating Icon (with Icon in HUD)

Posted: Thu Mar 03, 2011 7:10 pm
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)
}
}
}
}

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

Posted: Thu Mar 03, 2011 7:22 pm
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).